diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..b7efcee --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,4 @@ +# https://github.com/rui314/mold?tab=readme-ov-file#how-to-use +[target.'cfg(target_os = "linux")'] +linker = "clang" +rustflags = ["-C", "link-arg=-fuse-ld=mold"] diff --git a/nix/shell.nix b/nix/shell.nix index 111b803..ae65e10 100644 --- a/nix/shell.nix +++ b/nix/shell.nix @@ -1,27 +1,31 @@ { mkShell, + cargo, + rustc, + mold, + clang, rust-analyzer-unwrapped, rustfmt, clippy, - cargo, taplo, - rustc, rustPlatform, gnuplot, }: mkShell { + name = "microfetch"; strictDeps = true; - nativeBuildInputs = [ cargo rustc + mold + clang rust-analyzer-unwrapped (rustfmt.override {asNightly = true;}) clippy taplo - gnuplot # For Criterion.rs plots + gnuplot # for Criterion.rs plots ]; env.RUST_SRC_PATH = "${rustPlatform.rustLibSrc}";