diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..bac2d85 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,6 @@ +[target.x86_64-unknown-linux-gnu] +linker = "clang" +rustflags = [ + "-C", "link-arg=-fuse-ld=mold", # Link using mold + "-Zshare-generics=y" # (Nightly) Make the current crate share its generic instantiations +] diff --git a/flake.nix b/flake.nix index ca6526d..3572a52 100644 --- a/flake.nix +++ b/flake.nix @@ -21,7 +21,7 @@ }; # Includes cargo, rustc, rustfmt - rust-stable = pkgs.rust-bin.stable.latest.default.override { + rust-stable = pkgs.rust-bin.nightly.latest.default.override { extensions = ["rust-src"]; # Include the rust stdlib source for intellij }; in { @@ -30,6 +30,9 @@ nativeBuildInputs = with pkgs; [ gcc14 + clang_19 + # lld + mold rust-stable # rust-analyzer # System install