A WebAssembly backend for OCaml

An article on the WebAssembly backend work done so far and what lies ahead:

14 Likes

@SanderSpies great article, thanks for breaking down the state of affairs. Iā€™m trying to grasp how far away we are from a decent web assembly experience in OCaml. It sounds quite far still. In fact, the article essentially ends on the sobering point that the garbage collector extension is not mature enough yet to even begin to instrument over it. Do you think we are years away from being able to target web assembly from OCaml? Or more like months?

PS: I noticed you mentioned Tezos benefiting from your work, but so would Holochain, which is the driving force towards web assembly for me personally.

1 Like

@struktured Apologies for the late reply, Iā€™m doing a bit of investigation on how we can best proceed. Next year it should be possible to have an initial prototype which uses reference types and fakes the GC in JavaScript. The step from there to actual wasm GC is much smaller. I believe this is already quite exciting. Iā€™m trying to distill these ideas in a second article.

1 Like

Second article is here: https://medium.com/@sanderspies/the-road-to-webassembly-gc-for-ocaml-bd44dc7f9a9d (slightly rushed).

2 Likes