Hacker News new | ask | show | jobs
by dleslie 1719 days ago
Zig did not compile to C, yet, and so is restricted to llvm's targets.
2 comments

That's not released or finished, last I checked a few weeks ago.

Edit: Oh, looks like it was released just a few days after I last checked; ha. Although, it's not clear to me whether it's intended for end-user use yet.

https://github.com/ziglang/zig/releases/tag/0.8.0

Self-Reply addendum: on Discord the devs claim it's nowhere near ready for general use.
I think you can compile Zig to WASM, and then it's just a matter of finding a WASM interpreter/JIT in C.
... That would be terrible on, say, the Sega Genesis or 32X.
I don't see how it's more terrible than using Nim.
Nim is elegant, relatively safe, and not interpreted; its performance is within a stone's throw of C, and roughly on par with Zig; but with better safety guarantees.