State Channels in the browser, etc

This post is to give an overview of the current state of play of running state channel code in the browser, or indeed anywhere.

Currently we are constrained by the fact that our state channel code, and specifically the finite state machine (FSM) which controls state changes, are written in Erlang, which has poor mobile and browser support. This is completely understandable given Erlang’s background.

Fortunately a few related open-source projects seem likely to help us with this. The Lumen project compiles Erlang and Elixir code to the LLVM Intermediate Representation. From here the IR can be compiled down to whatever targets LLVM supports–in this case WASM.

We’ve been in touch with members of the LLVM and the related EIR project and hope to work with them on this. The current plan is that in the next month or so it will be possible to compile our Erlang to run in the browser. Of course the whole node will probably always remain an impossible dream but we ought to be able to think about compiling locally in a browser, after that running the VMs in the browser, and at some point soon-ish, thinking about running state machines in the browser.

Watch this space for more news.