From 20ac63c64eb6d4d3c7f41b9322123c2e2e0b708b Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Fri, 22 Nov 2024 21:25:34 +0100 Subject: [PATCH] optimizations!!!! woohoo!! --- .cargo/config.toml | 18 ++++++++++++++++++ Cargo.lock | 10 ++++++++++ Cargo.toml | 2 +- 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..1a992d1 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,18 @@ +[target.x86_64-unknown-linux-gnu] +linker = "clang" +rustflags = [ + "-C", "link-arg=-fuse-ld=mold", + # (Nightly) Make the current crate share its generic instantiations + "-Zshare-generics=y", +] + +[unstable] +codegen-backend = true + +[profile.dev] +codegen-backend = "cranelift" + +[profile.dev.package."*"] +codegen-backend = "llvm" + + diff --git a/Cargo.lock b/Cargo.lock index fd248f3..6eecf52 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -301,6 +301,7 @@ version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "043c9ad4b6fc4ca52d779873a8ca792a4e37842d07fce95363c9e17e36a1d8a0" dependencies = [ + "bevy_dylib", "bevy_internal", ] @@ -508,6 +509,15 @@ dependencies = [ "sysinfo", ] +[[package]] +name = "bevy_dylib" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c399292fac67682a72666e78872626f3c1c39b34c430b6f02c81d21da91b500" +dependencies = [ + "bevy_internal", +] + [[package]] name = "bevy_ecs" version = "0.14.2" diff --git a/Cargo.toml b/Cargo.toml index 920935b..00b060f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -bevy = "0.14.2" +bevy = { version = "0.14.2", features = ["dynamic_linking"] } bevy_rapier2d = "0.27.0" # Enable a small amount of optimization in the dev profile.