[alias] rr = "run --release" rb = "run --bin" d = "doc --no-deps --open" [build] target = "x86_64-unknown-linux-gnu" target-dir = "/home/tao/.cache/cargo/target" rustflags = ["-Z", "threads=8"] rustc-wrapper = "/path/to/sccache" [unstable] codegen-backend = true [provile.dev] debug = 0 strip = "debuginfo" opt-level = 1 lto = "off" codegen-backend = "cranelift" [profile.dev.package."*"] # slow clean build for faster incrementals opt-level = 3 [profile.release] incremental = true codegen-units = 1 lto = "fat" # [target.x86-unknown-linux-musl] # # linker = "musl-gcc" # linker = "clang" # rustflag = ["-C", "target-cpu=native", "link-arg=ld-path=${pkgs.mold}/bin/mold"] [target.x86_64-unknown-linux-gnu] linker = "clang" rustflags = ["-Ctarget-cpu=native", "-Clink-arg=--ld-path=wild"] # jonhoo # https://benw.is/posts/how-i-improved-my-rust-compile-times-by-seventy-five-percent # https://www.williballenthin.com/post/rust-compilation-time/