Hacker News new | ask | show | jobs
by apgwoz 354 days ago
> I see that bootstrapping involves some bizarre wasm hack instead of the tried and true bootstrapping approach of writing a simple first pass compiler in c (or some other language) and I am reminded again why I would never choose this language.

The hack allows the compiler to be maintained in Zig, compiled to WASM (a supported backend), and then bootstrapped with only a wasm interpreter… and one is provided in a single C file (I believe… but haven’t looked in a while).

This is a much nicer situation than most other bootstrap scenarios. All the SMLs, for instance, require you to have a whole other SML! MoscowML bootstraps with an included Caml interpreter… but it’s not sufficient to compile MLton.