Skip to content

Commit f7fbf8a

Browse files
orthur2jinzhongjia
authored andcommitted
docs(course): Update project initialization section in zig command documentation
Updated the documentation for the zig init command, added newly created files build.zig.zon and root.zig , and improved the directory structure comments. Also corrected the file list description to match the actual generated files.Actually,I found that even with zig 0.14.0 (the previous version which also mentioned on this site page),the output of zig init is the same as with zig 0.14.1,which is different from what this documentation descirbes.Anyway,I think it needs to be updated to avoid being misleading.
1 parent 28b2d7e commit f7fbf8a

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

course/environment/zig-command.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,17 @@ outline: deep
2424

2525
## `zig init`
2626

27-
这个命令用于初始化项目,在当前路径下创建 `src/main.zig``build.zig``src/lib.zig` 三个文件
27+
这个命令用于初始化项目,在当前路径下创建 `src/main.zig``src/root.zig``build.zig``build.zig.zon` 四个文件
2828

2929
关于 `build.zig` 这个文件的内容涉及到了 zig 的构建系统,我们将会单独讲述。
3030

3131
```sh
32-
.
33-
├── build.zig
34-
└── src
35-
└── main.zig
36-
└── lib.zig
32+
. # 项目根目录
33+
├── build.zig # Zig 构建脚本:定义如何编译、测试和打包项目
34+
├── build.zig.zon # 项目清单文件 (zon是Zig Object Notation):声明项目元数据和依赖项
35+
└── src # 源代码目录
36+
├── main.zig # 程序主入口文件
37+
└── root.zig # 核心逻辑模块:存放应用或库的主要代码和功能
3738
```
3839

3940
## `zig ast-check`

0 commit comments

Comments
 (0)