Using stdweb (emscripten, webassembly) and futures/tokio together


If you try to use futures and/or tokio together with emscripten/webassembly, you will quickly realize that the mio crate doesn’t compile, and that therefore the tokio_core crate cannot be compiled either, and therefore that you cannot create a tokio_core::reactor::Core to use its run() method.

I created a small gist showing how to solve this problem by implementing Executor yourself using the stdweb crate: