rust configuration

This commit is contained in:
LordMZTE 2024-08-03 11:50:52 +02:00
parent 389a3b2d0b
commit 29b5164b15
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6
3 changed files with 12 additions and 4 deletions

View file

@ -1,8 +1,4 @@
<! local ncpus = tonumber(opt.system "nproc") !> <! local ncpus = tonumber(opt.system "nproc") !>
[target.x86_64-unknown-linux-gnu]
linker = "/usr/bin/clang"
rustflags = ["-Clink-arg=-fuse-ld=lld"]
[profile.release] [profile.release]
lto = true lto = true
opt-level = 3 opt-level = 3
@ -10,3 +6,9 @@ codegen-units = <% math.min(ncpus, 4) %>
[profile.debug] [profile.debug]
codegen-units = <% ncpus %> codegen-units = <% ncpus %>
[registry]
default = "mzte"
[registries.mzte]
index = "sparse+https://git.mzte.de/api/packages/LordMZTE/cargo/"

View file

@ -0,0 +1,4 @@
<! if opt.mztegit_token then !>
[registries.mzte]
token = "Bearer <% opt.mztegit_token %>"
<! end !>

View file

@ -39,6 +39,7 @@ let
cargoSha256 = "sha256-/jx1hC/98v5L8XLG3ecFkk5H60HDtaKede+a8HDeFk4="; cargoSha256 = "sha256-/jx1hC/98v5L8XLG3ecFkk5H60HDtaKede+a8HDeFk4=";
}) })
rust-analyzer
taplo taplo
vscode-langservers-extracted # cssls, eslint, html, jsonls vscode-langservers-extracted # cssls, eslint, html, jsonls
zls zls
@ -47,6 +48,7 @@ let
(pkgs.linkFarm "prettier" [{ name = "bin/prettier"; path = "${nodePackages.prettier}/bin/prettier"; }]) # needed due to symlink shenanigans (pkgs.linkFarm "prettier" [{ name = "bin/prettier"; path = "${nodePackages.prettier}/bin/prettier"; }]) # needed due to symlink shenanigans
fnlfmt fnlfmt
nixpkgs-fmt nixpkgs-fmt
rustfmt
shfmt shfmt
stylua stylua