Guest language support: Zig
Zig is a great source language, and shows Wasm a lot of love in many different ways. I'd like to be able to use seperately-compiled Wasm components in Zig, so I wanted to open this issue to gauge demand.
Development of wit-bindgen I believe has settled down to the point that having a suite of guest languages makes sense. That being said I think it's still best for each guest language to determine how best to integrate bindings generation into the toolchain. For example with Rust it'll be through a crate on crates.io, not with the wit-bindgen CLI. I don't know myself how best Zig would integrate the code generation story.
That being said though while there's not a strict written down set of requirements of adding new guest languages to this repository one significant one I think we'd want is for a maintainer to "be on the hook". Changes regularly break other languages in often minor ways, and while I can personally take care of languages like Rust and C I often don't know how to handle Java and Go, for example. This means that new tests may be added which break on other bindings generators and they'll frequently be disabled for new bindings generators and someone will need to be on the hook for getting it passing.
All that to say that if a PR is presented with Zig support (or any other language, really), we'd need more than simply just that but additionally someone willing to be on the hook for continued maintenance of the generator.
Thanks for elaborating, a maintainer sounds reasonable.
Related to your above comments, I'll include some notes for the implementor (or me):
- The best way to integrate
wit-bindgeninto Zig's toolchain is likely through Zig's new package manager (note, this is not yet in the official release, as of 0.10.1) - As Zig operates intimately with C code, it might be easier to write/maintain a Zig wrapper around Alex's C implementation. That package manager PR show how to build
ffmpegwhile using Zig's package manager to depend onlibzandlibmp3lame, so reading that PR would be a great starting point.