Hi,

Zig uses a WASM image to bootstrapt [1].

> 1. Use system C compiler to compile zig-wasm2.c
> 2. Use zig-wasm2.c to convert zig1.wasm.zst to zig1.c
> 3. Use system C compiler to compile zig1.c.
> 4. Use zig1 to build the Zig compiler into zig2.c
> 5. Use system C compiler to compile zig2.c
> 6. zig2 build (standard build process for building Zig using an older Zig 
> build)

The only problem is how to get such .wasm.zst image (or expressed as can we 
trust the WASM image provied by Zig official). And I think this problem has 
been resolved mostly at guix [2][3].

> Could it reduce even more the set of minimal binaries required?

Zig has a build system insidt it. I have a dream maybe oneday we can use zig to 
build guile and get rid of GNU autotools. (I don’t like them.) We can then 
reimplement m4, autotools, etc. using guile to support programs that still use 
autotools.

For macOS support, guix-daemon includes some linux-specific head files but I 
think for most of them I can find an alternative on macOS. I can’t give you a 
clear conclusion right now.

[1]: https://ziglang.org/news/goodbye-cpp/
[2]: https://jakstys.lt/2024/zig-reproduced-without-binaries/
[3]: https://lists.gnu.org/archive/html/guix-devel/2024-12/msg00283.html

Reply via email to