-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrust.task.lua
35 lines (33 loc) · 859 Bytes
/
rust.task.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
local hm = require("heime")
local config = {
alias = {
t = "test --quiet -- --nocapture --color=always",
br = "build --release",
rr = "run --release",
pedantic = "clippy -- -W clippy::pedantic",
ped = "pedantic",
nursery = "clippy -- -W clippy::nursery",
nur = "nursery",
},
build = hm.is_linux and {
rustflags = { "-C", "link-arg=-fuse-ld=lld" },
}
or {
rustflags = {
"-C",
"link-arg=-fuse-ld=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld",
"-C",
"link-arg=-ld_new",
},
},
net = {
["git-fetch-with-cli"] = true,
},
}
return hm.task({
name = "rust",
description = "setup and configure rust",
run = function(ctx)
ctx:write(hm.path(hm.home_dir, ".cargo", "config.toml"), hm.to_toml(config))
end,
})