2024-03-12
Andrew 最近在 zigshow 节目中介绍了 Zig 2024 年的规划,主要有以下几点:
更多细致总结可以参考:Zig Roadmap 2024 - Andrew Kelley #91 B 站搬运地址:https://www.bilibili.com/video/BV1UC4y167w9/
Fast-growing Zig tops Stack Overflow survey for highest-paid programming language
估计是 Bun 带动的贫富差距?!
Pool with generational references in Zig
作者在文中介绍了一种有意思的思路:当有很多指针指向同一个对象时,如何不用遍历这些指针就能让其失效,答案是用一个胖指针,包括两部分:真正的数据指针和指向对象的年龄,当指针的年龄和指向对象的年龄不一致时,即认为该指针失效。
TCC RISC-V Compiler runs in the Web Browser (thanks to Zig Compiler)
TCC 是一个 64 位 RISC-V 的编译器,作者在这篇文章里利用 Zig 把它编译成 WebAssembly 放到浏览器里执行。其中的难点在于 TCC 会调用 Posix 的一些函数,比如:fopen、fprintf、strncpy、malloc 等,但是这些在 WebAssembly 里是没有的,因此需要自己实现,不过幸好 Zig 社区内已经有不少 libc 的实现了:
Building the DirectX shader compiler better than Microsoft?
Sig Engineering - Part 2 - Progress on AccountsDB & more
Syndica 公司的 Sig,这是一款用 Zig 编写的、专注于 RPS 的 Solana 验证器客户端。在这篇文章里,他们分析了如何优化 HashMap 的性能,而且实现了一个基于本地磁盘的 Allocator。而且他们还在招聘 Zig 工程师:
semickolon/kirei
🌸 The prettiest keyboard software
Dok8tavo/Interfacil
Interfacil is a Zig package for making and using interfaces easily in Zig.
kamlesh-nb/azure-sdk-for-zig
Azure Sdk for Zig - Experimental
ringtailsoftware/zig-wasm-audio-framebuffer
Examples of integrating Zig and Wasm for audio and graphics on the web
cztomsik/tokamak
Server-side framework for Zig, relying heavily on dependency injection.
The-Z-Labs/cli4bofs
Command line interface for (running) BOFs
nelipuu/zbind
Zig-TypeScript binding generator 🟦 🦎
sneekyfoxx/ziggy
又又一个 Zig 版本管理工具