1
0
Fork 0
mirror of https://github.com/ryanccn/flake.git synced 2025-12-06 08:10:43 +01:00

feat(rust): switch to rust-overlay, use mold

This commit is contained in:
Ryan Cao 2024-04-06 16:17:37 +08:00
parent 2eb3764b31
commit 3861c0442b
Signed by: ryanccn
SSH key fingerprint: SHA256:NtP/BlVhoQq4xU6BEcZeT8nIPvHntkJ3lIc2yB+F09E
2 changed files with 5 additions and 15 deletions

View file

@ -7,22 +7,12 @@
toml = pkgs.formats.toml {};
in {
home.file."${config.xdg.dataHome}/cargo/config.toml".source = toml.generate "config.toml" {
build.rustc-wrapper = "${lib.getExe' pkgs.sccache "sccache"}";
linker = "${lib.getExe pkgs.clang}";
rustflags = ["-C" "link-arg=-fuse-ld=${lib.getExe pkgs.mold}"];
};
home.packages = with pkgs; [
(fenix.combine (
with fenix;
with stable; [
cargo
rustc
rustfmt
clippy
rust-src
targets.wasm32-unknown-unknown.stable.rust-std
]
))
rust-bin.stable.latest.default
cargo-bloat
cargo-cache
cargo-deny