3 ms·
Really? If OCaml has a compiler to Wasm, I’m not aware of it. I’m only aware that it compiles to JS (via js_of_ocaml or Bucklescript). Could I please have a lin
by TheAsprngHacker 8y ago
Really? If OCaml has a compiler to Wasm, I’m not aware of it. I’m only aware that it compiles to JS (via js_of_ocaml or Bucklescript). Could I please have a link to the Wasm compiler if you have it?
I read somewhere that an OCaml to LLVM compiler was attempted, but people had problems with the GC aspect. I don’t know if this claim is true, though.
- lucideer 8y ago> I once read that an OCaml to LLVM compiler was attempted, but people had problems with the GC aspect. I can’t confirm this claim though. I was thinking of the same, but I hadn't/haven't used it so you may be right it never came to fruition.
- sanderre 8y agoWhenever I manage to find time to hack on it: https://github.com/SanderSpies/ocaml/tree/wasm-backend https://github.com/SanderSpies/ocaml/tree/wasm-backend. It compiles to wasm object files and links files with LLVM's LLD. My current challenge is ensuring that the stdlib correctly translates to wasm. The C parts are not translated yet - which means: no gc, no exceptions, no tail calls.