From 859356db3f0158f31549f9fd38b511ef5e9a947c Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sun, 22 Dec 2024 13:31:27 -0500 Subject: [PATCH] Running cargo-wizard to speed up compilation times. --- .cargo/config.toml | 2 ++ Cargo.toml | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 000000000..4b2316cb7 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,2 @@ +[build] +rustflags = ["-Clink-arg=-fuse-ld=lld", "-Zthreads=16", "-Ctarget-cpu=native"] diff --git a/Cargo.toml b/Cargo.toml index b03a01715..fb233a823 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,17 +24,21 @@ doctest = false [lints] workspace = true +cargo-features = ["codegen-backend"] + # See https://github.com/johnthagen/min-sized-rust for additional optimizations [profile.release] -debug = 0 -lto = "fat" +debug = false +lto = true opt-level = 3 # Optimize for speed, not size. codegen-units = 1 # Reduce parallel code generation. +panic = "abort" # This profile significantly speeds up build time. If debug info is needed you can comment the line # out temporarily, but make sure to leave this in the main branch. [profile.dev] debug = 0 +codegen-backend = "cranelift" [features] json-log = ["tracing-subscriber/json"]