rusty_v8
rusty_v8 copied to clipboard
feat: Add bindings for WasmStreaming::set_compiled_module_bytes and CompiledWasmModule::serialize
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.
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.
@12101111 Is this ready for review? Or if not, do you plan to work on it?
WasmStreaming::set_client somhow don't work, but I don't have time to investigate it.