Zig 首个 GPU 原生 UI 框架
为什么值得看
Gooey 是 Zig 语言的 GPU 加速 UI 框架,采用混合即时/保留模式,跨平台支持 Metal、Vulkan、WebGPU。对厌倦了 C++ 或 Rust UI 复杂度的系统级开发者,这可能是 Zig 生态从"有趣"走向"可用"的关键基础设施。
媒体预览
编辑判断
Zig 社区一直在等一个能证明这门语言不止适合写编译器的杀手级应用层项目。UI 框架是公认最难啃的骨头——Rust 有 egui、Slint 多年积累,C++ 有 Dear ImGui 统治即时模式领域,Gooey 选择混合模式是聪明定位,既保留即时模式的开发效率,又解决复杂界面状态管理痛点。
目前最大风险是"早期开发"标签下的 API 稳定性,以及 Zig 自身编译器仍未达 1.0。但如果你在做嵌入式图形工具、游戏编辑器或需要 WASM 部署的高性能界面,Gooey 比用 Rust 重写 egui 或绑定 C++ 的尝试成本更低。建议先跑 Wayland/Vulkan 路径,WebGPU 后端成熟度存疑。
社区反馈
意见分歧 17 条评论
核心争论:Zig 写 GUI 是否可行:生态成熟度 vs 摆脱 C++/Rust 复杂度
Interesting project, but needs documentation. In particular, what's the model it uses? I.e. how are events, state, etc. handled? Normally I'd just work it out from the code examples, but the example in the README is over 200 lines which is too long for me. (Don't tell me here. Make your docs better,
> Inspiration > GPUI - Zed's GPU UI framework Cool, but a comparison would also be very helpful. If I decide to make a GUI app with Zig, how do I choose between Gooey and GPUI? So far, all I know that GPUI is more mature and has at least one successful project built with it, so... Also: > Gooey:
> how do I choose between Gooey and GPUI? GPUI is for rust, not zig