1

faster bevy compile with mold and nightly rustc

This commit is contained in:
2024-10-05 16:28:35 +02:00
parent 3469aae86e
commit 7e87caeb6b
2 changed files with 10 additions and 1 deletions

6
.cargo/config.toml Normal file
View File

@ -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
]

View File

@ -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