Hacker News new | ask | show | jobs
by richard_todd 1283 days ago
Why not compile directly to C in step one, if you’re already presuming the presence of a zig compiler?
1 comments

>Compile the compiler to C code - This is the approach taken by Nim, for example.

>In Zig’s case, I explored this possibility, and found the generated C code to not only be target-specific, but also large.

Even ignoring the large-ness, the fact that it was target-specific makes it unusable for bootstrapping new targets.

The WASM blob is target-independent.