rusty_v8 icon indicating copy to clipboard operation
rusty_v8 copied to clipboard

feat: Add bindings for WasmStreaming::set_compiled_module_bytes and CompiledWasmModule::serialize

Open 12101111 opened this issue 3 years ago • 4 comments

Add some bindings to serialize and load compiled WebAssembly module cache.

With these bindings, we can cache the compiling result of WebAssembly module: https://github.com/denoland/deno/issues/11918#issuecomment-955683827

Test is not working currently.

12101111 avatar Nov 01 '21 15:11 12101111

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Nov 01 '21 15:11 CLAassistant

I believe this would also let us wake the tokio context in Deno when the module is done compiling, which would make it no longer necessary to keep the event loop spinning while a wasm module is being compiled:

https://github.com/denoland/deno/blob/b92019a8475a16213028ab73b15be5a3f7c56e0a/core/runtime.rs#L832-L834

Though maybe not, since there doesn't seem to be a way to listen for compilation failures.

andreubotella avatar Nov 01 '21 20:11 andreubotella

@12101111 Is this ready for review? Or if not, do you plan to work on it?

bnoordhuis avatar Dec 11 '21 10:12 bnoordhuis

WasmStreaming::set_client somhow don't work, but I don't have time to investigate it.

12101111 avatar Dec 11 '21 11:12 12101111