blazingly fast

This commit is contained in:
Rowan S-L 2023-12-10 12:18:19 -05:00
parent ca0a2ecb25
commit 780714be4e
3 changed files with 19 additions and 2 deletions

17
.cargo/config.toml Normal file
View File

@ -0,0 +1,17 @@
# Add the contents of this file to `config.toml` to enable "fast build" configuration. Please read the notes below.
# NOTE: For maximum performance, build using a nightly compiler
# If you are using rust stable, remove the "-Zshare-generics=y" below.
[target.x86_64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-Clink-arg=-fuse-ld=mold", "-Zshare-generics=y"]
# [target.x86_64-pc-windows-msvc]
# linker = "rust-lld.exe"
# rustflags = ["-Zshare-generics=n"]
# Optional: Uncommenting the following improves compile times, but reduces the amount of debug info to 'line number tables only'
# In most cases the gains are negligible, but if you are on macos and have slow compile times you should see significant gains.
#[profile.dev]
#debug = 1

View File

@ -28,7 +28,7 @@
# cf. https://crane.dev/API.html#libcleancargosource
src = craneLib.cleanCargoSource ./.;
# compile-time
nativeBuildInputs = with pkgs; [ rustToolchain pkg-config yt-dlp alsa-lib ];
nativeBuildInputs = with pkgs; [ rustToolchain clang mold-wrapped pkg-config alsa-lib ];
# runtime
buildInputs = with pkgs; [ yt-dlp alsa-lib ]; # needed system libraries
cargoArtifacts = craneLib.buildDepsOnly { inherit src buildInputs nativeBuildInputs; };

View File

@ -1,3 +1,3 @@
[toolchain]
channel = "stable"
channel = "nightly"
components = [ "rustfmt", "clippy", "rust-src" ]