Closed pannous closed 3 years ago
since lumen compiles to wasm
This is not strictly true. The spawn-chain demo uses the full runtime to demonstrate that Erlang process switching works in a browser and that we can integrate with browser APIs, but the lumen
compiler does not produce the .wasm
module for that example. That was me hand-translating the Elixir code to Rust that does the equivalent of what the compiler will eventually do.
We've been holding out on compiling to WASM because we're pushing for stack switching support, but the WASM specification process is slow. We're investigating doing the equivalent of an Asyncify transform in our compiler as a hold-over since the specification process is taking so long.
That spawn-chain
demo used to be published as part of the archives for the CircleCI build, but that's likely cleared out now since we haven't used CircleCI in over a year since switching to GitHub actions, which does not publish artifacts in the same way.
As a project, we don't feel comfortable posting a demo of lumen targeting wasm until it the compile can do it and there's no hand-porting involved.
thanks for the very elaborate reply.
since it might be of general interest and since you put so much effort in answering you might consider copy pasting the text to a wiki or reopening the ticket so others can find it.
(meta: it should really be a github feature to show up close tickets if nothing else is found)
since lumen compiles to wasm, could you offer a hosted demo?