Hacker News new | ask | show | jobs
by d215 3130 days ago
Honest question, Is reason really targeting wasm right now? Do you know a resource describing this? I cannot find anything about this.
3 comments

Yes, but a byte code interpreter ported to wasm via emscripten != a compiler with a WASM backend.
Isn't the stuff that comes out of the OCaml compiler byte code?

As far as I can tell, OCaml has a GC and WASM (at the moment) doesn't so this seems like the only viable solution to me.

OCaml also has a native x86 backend, which produces quite efficient code.
I couldn't find anything on this either. The assembly emitters in their repo don't suggest a WASM backend: https://github.com/ocaml/ocaml/tree/trunk/asmcomp
AFAIK Reason is a frontend for OCaml and can target whatever OCaml can target. Note that for targeting JavaScript they are using BuckleScript, an OCaml backend that's not built by Facebook.