Run payload formatters via WebAssembly runtime #2707
Labels
c/application server
This is related to the Application Server
performance
Something is slow or takes too much CPU/Memory/...
Summary
Support running payload formatters via WebAssembly runtime
Why do we need this?
What is already there? What do you see now?
What is missing? What do you want to see?
Embedded WASM runtime, which would run WASM modules.
How do you propose to implement this?
Unfortunately, it is not possible to compile JavaScript down to WASM at this point of time. We would need to both have a JavaScript VM and WASM runtime working alongside for this.
Long term, however, given the simplicity of the formatters, we could parse them and convert to TypeScript, which can, in turn, be compiled to WASM.
At the time of writing there are 2 well-supported runtimes with Go bindings: https://github.com/bytecodealliance/wasmtime-go (wasmtime)
https://github.com/wasmerio/go-ext-wasm (wasmer)
As well as less-mature pure-Go runtimes:
https://github.com/perlin-network/life
https://github.com/mathetake/gasm
Perhaps at a later point of time it will be possible to completely get rid of JS VM and compile JS down to WASM and run it in a WASM runtime.
How do you propose to test this?
Integration testing, existing unit tests
Can you do this yourself and submit a Pull Request?
yes
The text was updated successfully, but these errors were encountered: