From 3c1868ef993c610f195a7cbd69daae7700819381 Mon Sep 17 00:00:00 2001 From: Cathal Mullan Date: Fri, 15 Nov 2024 20:58:26 +0000 Subject: [PATCH] Tweak release profile. --- Cargo.toml | 4 ++++ nix/vm.nix | 3 +++ 2 files changed, 7 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 84689149..fcd98777 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -49,6 +49,10 @@ str_to_string = "deny" insta.opt-level = 3 similar.opt-level = 3 +[profile.release] +lto = "fat" +codegen-units = 1 + [profile.profiling] inherits = "release" debug = true diff --git a/nix/vm.nix b/nix/vm.nix index 24c0838b..f17fc477 100644 --- a/nix/vm.nix +++ b/nix/vm.nix @@ -62,11 +62,14 @@ defaultPackages = with pkgs; [ gcc (rust-bin.stable."1.82.0".minimal) + sccache gnuplot ]; variables = { + RUSTC_WRAPPER = "${pkgs.sccache}/bin/sccache"; RUSTFLAGS = "-C target-cpu=native"; + CARGO_INCREMENTAL = "0"; CARGO_TARGET_DIR = "/tmp"; };