Popcorn, the library that runs Elixir code in the browser, is now stable
This is possible because it now builds on a very stable foundation: the BEAM itself. Until now, Popcorn was based on AtomVM, a tiny Erlang VM designed for limited environments such as microcontrollers or WASM.
It turns out WASM is not as limited as we thought, and it can run the BEAM just fine! That means Popcorn is now compatible with the BEAM and can run the latest Elixir/OTP versions.
The switch also gave us better stability and performance, while the VM fits in 1 MB gzipped and has the potential to shrink even further.
This is cool! I looked at Popcorn when it was on AtomVM and that did not fit my need, so I started building BEAM.com. Glad that WASM is now a good candidate to make the BEAM more accessible.
Thanks for reporting! The VM version in the error (29.0.6) is the version that Popcorn runs. As long as you have OTP 29.0.* on the host, it should work as expected. The fix to make this more clear is underway. Support for more OTP versions will come with the next release.
v1.0 looks really cool! And I wonder, could it be used for a decentralised network? If we can have the power of the BEAM in a browser, pretty much every person on this planet could help host a decentralised censorship-free site by simply keeping a tab open
It can! Here is a LiveBook running on GitHub Pages, which is static site hosting: BEAM.com in Livebook
That means we can just open the HTML locally, offline. Or you can have a single livebook.com file that can run in any OSes. That’s what BEAM.com does. It compiles your Erlang or Elixir project into either a single file, or a WASM that can runs BEAM in the browser.