Skip to content

Commit 02d36b9

Browse files
chore : declare dev environment using nix
Signed-off-by: Archisman <[email protected]>
1 parent 7e499fd commit 02d36b9

11 files changed

+169
-0
lines changed

Diff for: .direnv/flake-profile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
flake-profile-1-link

Diff for: .direnv/flake-profile-1-link

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/nix/store/x5bkjwj9aq65j7k58mlhdk22gdd3vrfx-nix-shell-env

Diff for: .envrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target

Diff for: Cargo.lock

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: Cargo.toml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[package]
2+
name = "arcdb"
3+
version = "0.1.0"
4+
edition = "2024"
5+
6+
[dependencies]

Diff for: flake.lock

+82
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: flake.nix

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
inputs = {
3+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
4+
flake-utils.url = "github:numtide/flake-utils";
5+
6+
rust-overlay = {
7+
url = "github:oxalica/rust-overlay";
8+
inputs = {
9+
nixpkgs.follows = "nixpkgs";
10+
};
11+
};
12+
};
13+
14+
outputs =
15+
{
16+
self,
17+
nixpkgs,
18+
flake-utils,
19+
rust-overlay,
20+
}:
21+
flake-utils.lib.eachDefaultSystem (
22+
system:
23+
let
24+
overlays = [
25+
(import rust-overlay)
26+
];
27+
28+
pkgs = import nixpkgs {
29+
inherit system overlays;
30+
config.allowUnfree = true;
31+
};
32+
33+
projectRootPath = ./.;
34+
rustToolchainFilePath = projectRootPath + /rust-toolchain.toml;
35+
in
36+
with pkgs;
37+
{
38+
nativeBuildInputs = [
39+
(rust-bin.fromRustupToolchainFile rustToolchainFilePath)
40+
];
41+
42+
devShells.default = mkShell {
43+
buildInputs = [
44+
llvm
45+
rustup
46+
(rust-bin.fromRustupToolchainFile rustToolchainFilePath)
47+
wasm-tools
48+
];
49+
};
50+
}
51+
);
52+
}

Diff for: rust-toolchain.toml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[toolchain]
2+
channel = "stable"
3+
profile = "default"
4+
components = []

Diff for: rustfmt.toml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
group_imports = "One"
2+
imports_granularity = "One"
3+
4+
tab_spaces = 2
5+
6+
max_width = 100
7+
comment_width = 100
8+
9+
use_field_init_shorthand = true
10+
11+
control_brace_style = "ClosingNextLine"

Diff for: src/main.rs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#![allow(non_snake_case)]
2+
3+
fn main() {}

0 commit comments

Comments
 (0)