File tree Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 2
2
serve :
3
3
hugo serve
4
4
5
- # 初始化下载,更新到 .gitmodules 中指定的 commit
6
- init :
7
- git submodule update --init
8
-
9
5
lint :
10
6
npx @lint-md/cli ** /*
11
7
Original file line number Diff line number Diff line change @@ -11,19 +11,23 @@ Zig 官网的[下载页面](https://ziglang.org/download/)中包含常见平台
11
11
12
12
现在,你可以运行 ` zig zen ` 和 ` zig version ` 来测试是否安装正确。
13
13
14
- > 译者注:建议读者使用版本管理工具来安装 Zig,具体可参考: [ 《Zig 多版本管理》 ] ({{< ref "/post/2023-10-14-zig-version-manager.org" >}})。
14
+ > 译者注:建议读者使用版本管理工具来安装 Zig。以下是使用 [ asdf ] ( https://asdf-vm.com/ ) 的安装方法:
15
15
16
16
``` bash
17
- git clone https://github.com/asdf-vm/asdf.git ~ /.asdf --branch v0.14.0
18
- cat << 'EOF ' >> $HOME/.bashrc
19
- source "$HOME/.asdf/asdf.sh"
20
- source "$HOME/.asdf/completions/asdf.bash"
21
- EOF
17
+ brew install asdf
22
18
23
- asdf plugin- add zig https://github.com/zigcc/asdf-zig.git
19
+ asdf plugin add zig https://github.com/zigcc/asdf-zig.git
24
20
25
21
# 安装最新版
26
22
asdf install zig latest
23
+
24
+ # 设置为全局版本
25
+ # asdf 0.16 之前
27
26
asdf global zig latest
27
+
28
+ # asdf 0.16 之后
29
+ asdf set --home zig latest
30
+
31
+ # 验证安装
28
32
zig version
29
33
```
You can’t perform that action at this time.
0 commit comments