After spending a lot of time analyzing different WASM interpreters...
I'm thinking of building my own #WebAssembly interpreter/runtime.
Why?
Thread! 
-
-
After that, I pleasantly discovered wasmjit. wasmjit tries to compile
#WebAssembly directly to assembly code, so the modules run at near-native speed (10% slowdown compared to the native code). https://github.com/rianhunter/wasmjit/ … However...Show this thread -
wasmjit it's a bit of a pain to work with... since all the architecture instructions have to be written by hand
https://github.com/rianhunter/wasmjit/blob/master/src/wasmjit/compile.c …
...and only works for now in one architecture (x86_64)
(it will require an ARM compiler, for example, to be available on ARM architectures)Show this thread -
And then, I discovered warpy. Warpy uses
#pypy under the hood to generate a next-gen WASM interpreter. That means... using#rpython to write the interpreter, instead of C or C++!
https://github.com/kanaka/warpy
However, I got stuck after extending the globals.Show this thread -
After some research, I read this article https://rpython.readthedocs.io/en/latest/faq.html#could-we-use-llvm … from the
#pypy docs which points to the Webkit B3 JIT Compiler blogpost https://webkit.org/blog/5852/introducing-the-b3-jit-compiler/ … and it opened my eyes.Show this thread -
Basically, WASM with B3 can do a similar job compiling
#WebAssembly modules to native code... but in a much more maintainable way than wasmjit, and in a faster way than WAVM (since it relies on LLVM). So here I am... cloning WebKit to see what comes next :)pic.twitter.com/tRGSv5srwM
Show this thread
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.