From e18562ebe98adfda5ed15b52000996020bb0883c Mon Sep 17 00:00:00 2001 From: KercyDing Date: Fri, 10 Jul 2026 22:50:08 +0800 Subject: [PATCH] feat: remove Bun and add more examples --- course/.vitepress/sidebar.ts | 4 +- course/appendix/community.md | 11 ++++- course/appendix/well-known-lib.md | 78 +++++++++++++++++++------------ 3 files changed, 59 insertions(+), 34 deletions(-) diff --git a/course/.vitepress/sidebar.ts b/course/.vitepress/sidebar.ts index 945ed777..4fadfba0 100644 --- a/course/.vitepress/sidebar.ts +++ b/course/.vitepress/sidebar.ts @@ -271,11 +271,11 @@ export default [ link: "/appendix/contributor-covenant", }, { - text: "社区", + text: "社区与资源", link: "/appendix/community", }, { - text: "第三方库", + text: "第三方项目", link: "/appendix/well-known-lib", }, ], diff --git a/course/appendix/community.md b/course/appendix/community.md index a1732914..b7a7240c 100644 --- a/course/appendix/community.md +++ b/course/appendix/community.md @@ -3,12 +3,19 @@ outline: deep showVersion: false --- -# 社区 +# 社区与资源 -以下列出了一些,zig 相关的社区: +以下列出了一些 Zig 相关的社区与学习资源。 + +## 社区 - [Zig NEWS](https://zig.news/) - [Ziggit](https://ziggit.dev/) - [lemm](https://lemm.ee/c/zig) - [Zig SHOW](https://zig.show/) - [Zig 中文语言社区](https://github.com/zigcc) + +## 学习资源 + +- [Introduction to Zig](https://pedropark99.github.io/zig-book/):Pedro Duarte Faria 编写的英文项目式 Zig 入门书。 +- [Ziglings Exercises](https://codeberg.org/ziglings/exercises):通过修复练习代码来熟悉 Zig 的语法、标准库和常见编程模式。 \ No newline at end of file diff --git a/course/appendix/well-known-lib.md b/course/appendix/well-known-lib.md index 1f49f855..2d8214a4 100644 --- a/course/appendix/well-known-lib.md +++ b/course/appendix/well-known-lib.md @@ -3,33 +3,51 @@ outline: deep showVersion: false --- -# 第三方库 - -这里列出一些仍在积极维护的 Zig 第三方库,你可以进行参考和学习 - -- **[zap](https://github.com/zigzap/zap)**:速度极快的 zig 后端开发库 -- **[bun](https://github.com/oven-sh/bun)**: 使用 zig 编写的 js 运行时,原生支持 ts 和包管理 -- **[mach](https://machengine.org/)**:zig 的游戏引擎和图形套件 -- **[capy](https://github.com/capy-ui/capy)**:依托于 GTK4 的强大的 GUI 库 -- **[dvui](https://github.com/david-vanderson/dvui)**: 适用于应用程序和游戏的 Immediate Zig GUI -- **[zld](https://github.com/kubkon/zld)**: zig 实现的 LD 的替代品 -- **[zls](https://github.com/zigtools/zls)**: zig 的 language server 实现 -- **[dt](https://github.com/so-dang-cool/dt)**: 用于 unix 的 pipe -- **[arocc](https://github.com/Vexu/arocc)**: 使用 zig 编写的 C 编译器 -- **[bog](https://github.com/Vexu/bog)**: 一个轻量强类型嵌入式语言 -- **[buzz](https://github.com/buzz-language/buzz)**: 一个小型轻量的静态类型脚本语言 -- **[cyber](https://github.com/fubark/cyber)**: 一个快速高效且并发的脚本语言 -- **[ini](https://github.com/ziglibs/ini)**: 一个简单的 ini 文件解析库 -- **[koino](https://github.com/kivikakk/koino)**: Comrak 的解析器,并且保证与 github 的 markdown 规范兼容 -- **[LoLa](https://github.com/MasterQ32/LoLa)**: 适用于游戏的小型脚本语言 -- **[tigerbeetle](https://github.com/tigerbeetle/tigerbeetle)**: 专为关键任务安全性和性能而设计的分布式财务会计数据库 -- **[zig-sqlite](https://github.com/vrischmann/zig-sqlite)**: 对 sqlite 的 C API 包装库 -- **[duckdb](https://github.com/beachglasslabs/duckdb.zig)**: 对 duckdb 的 API 包裹 -- **[legend-of-swarkland](https://github.com/thejoshwolfe/legend-of-swarkland)**: 游戏,斯沃克兰的传说 -- **[pacman](https://github.com/floooh/pacman.zig)**: 吃豆人游戏的 zig 版本 -- **[tetris](https://github.com/andrewrk/tetris)**: 使用 zig 编写的俄罗斯方块 -- **[river](https://github.com/riverwm/river)**: 使用 zig 编写的窗口管理器 -- **[minisign](https://github.com/jedisct1/zig-minisign)**: zig 实现的 minisign -- **[zig-gamedev](https://github.com/michal-z/zig-gamedev)**: zig 的游戏生态库 -- **[zig-webui](https://github.com/webui-dev/zig-webui)**:webui 的包裹,允许 zig 将浏览器作为渲染前端 -- **[zigar](https://github.com/chung-leong/zigar)**: 在 JavaScript 项目中使用 Zig 代码 +# 第三方项目 + +这里列出一些仍在积极维护、使用 Zig 编写或面向 Zig 生态的第三方项目,你可以进行参考和学习。 + +## Web 与 GUI + +- **[zap](https://github.com/zigzap/zap)**:速度极快的 Zig 后端开发库 +- **[capy](https://github.com/capy-ui/capy)**:依托于 GTK4 的 GUI 库 +- **[dvui](https://github.com/david-vanderson/dvui)**:适用于应用程序和游戏的 Immediate Zig GUI +- **[zig-webui](https://github.com/webui-dev/zig-webui)**:WebUI 的 Zig 包装,允许 Zig 将浏览器作为渲染前端 + +## 游戏与图形 + +- **[mach](https://machengine.org/)**:Zig 的游戏引擎和图形套件 +- **[zig-gamedev](https://github.com/michal-z/zig-gamedev)**:Zig 的游戏开发生态库 +- **[Cubyz](https://github.com/PixelGuys/Cubyz)**:使用 Zig 编写的体素沙盒游戏 +- **[legend-of-swarkland](https://github.com/thejoshwolfe/legend-of-swarkland)**:使用 Zig 编写的游戏“斯沃克兰的传说” +- **[pacman](https://github.com/floooh/pacman.zig)**:吃豆人游戏的 Zig 版本 +- **[tetris](https://github.com/andrewrk/tetris)**:使用 Zig 编写的俄罗斯方块 + +## 编译器、语言与工具链 + +- **[zls](https://github.com/zigtools/zls)**:Zig 的 language server 实现 +- **[zld](https://github.com/kubkon/zld)**:使用 Zig 实现的 LD 替代品 +- **[arocc](https://github.com/Vexu/arocc)**:使用 Zig 编写的 C 编译器 +- **[bog](https://github.com/Vexu/bog)**:一个轻量强类型嵌入式语言 +- **[buzz](https://github.com/buzz-language/buzz)**:一个小型轻量的静态类型脚本语言 +- **[cyber](https://github.com/fubark/cyber)**:一个快速高效且并发的脚本语言 +- **[LoLa](https://github.com/MasterQ32/LoLa)**:适用于游戏的小型脚本语言 + +## 数据库、存储与格式 + +- **[tigerbeetle](https://github.com/tigerbeetle/tigerbeetle)**:专为关键任务安全性和性能而设计的分布式财务会计数据库 +- **[zig-sqlite](https://github.com/vrischmann/zig-sqlite)**:对 SQLite 的 C API 包装库 +- **[duckdb](https://github.com/beachglasslabs/duckdb.zig)**:DuckDB 的 Zig API 包装 +- **[ini](https://github.com/ziglibs/ini)**:一个简单的 INI 文件解析库 +- **[koino](https://github.com/kivikakk/koino)**:Comrak 的 Zig 解析器,并且保证与 GitHub 的 Markdown 规范兼容 + +## 系统工具与应用 + +- **[ghostty](https://github.com/ghostty-org/ghostty)**:使用 Zig 编写的终端模拟器 +- **[river](https://github.com/riverwm/river)**:使用 Zig 编写的窗口管理器 +- **[dt](https://github.com/so-dang-cool/dt)**:用于 Unix 的 pipe 工具 +- **[minisign](https://github.com/jedisct1/zig-minisign)**:使用 Zig 实现的 minisign + +## 跨语言集成 + +- **[zigar](https://github.com/chung-leong/zigar)**:在 JavaScript 项目中使用 Zig 代码 \ No newline at end of file