Just curious now that haskell directly compiles to wasm (https://www.tweag.io/blog/2022-11-22-wasm-backend-merged-in-ghc/), what's the status in ocaml (google gives me this: https://github.com/sabine/ocaml-to-wasm-overview).
And how much would it help jsCoq?
wasm is two things, better perf and a posix environment. the latter is already available to jscoq in the wacoq backend. Although not fully exploited as I write, It can drastically simplify building jscoq packages. The former would give more performance, but how much is not easy to guess.
in fact Jane Street ppl are very interested in evolving the wasm backend for OCaml. There are a few pitfalls which I guess led to Sabine's attempt not coming to fruition, but possibly the wasm standards have improved since then so hopefully there will be some port eventually. I may even be a part of these efforts myself :)
Cool! Any more info about the plans available?
not quite. Greta Yorsh was recently interested in doing it, but I think nothing concrete yet.
I found this blog post useful. It explains compiling ocaml to future versions of wasm:
https://ocamlpro.com/blog/2022_12_14_wasm_and_ocaml
It also points to https://github.com/remixlabs/wasicaml, which works with the current version.
It explains that running ocaml on the web is not one of their goals.
cool! thanks @Bas Spitters , we will follow it! I wonder what is their incentive for a wasm backend if not for running it on the web.
Last updated: Mar 28 2024 at 15:01 UTC