Forgot to mention that implementing a 
standards-conforming WebAssembly.compileStreaming in Node.js is probably 
not an option. There's no Request in Node.js to start with. The feature is 
covering local files only. Hence the proposal introduces a cache-enabled 
loader as a custom api (e.g. require("wasm/cache").loadFile(path) ).

The problem is that there's a single global WasmStreaming callback. 
Hijacking it makes future implementation of the proper 
WebAssembly.compileStreaming unnecessary cumbersome (if it comes to be). 
Even though Node.js itself probably isn't going to need it in foreseeable 
future, Node is often embedded in larger projects (e.g. Electron). Barring 
them from having this opportunity makes Node.js maintainers unhappy.

Best,
N

On Thursday, 31 December 2020 at 13:13:44 UTC+3 Nick Zavaritsky wrote:

> Hi!
>
> There's currently no compiled module cache for WASM modules in Node.js. 
> I've started an effort to make one (
> https://github.com/nodejs/node/issues/36671). There's a POC already.
>
> The POC hijacks WebAssembly.compileStreaming. It uses 
> v8::WasmStreaming::SetCompiledModuleBytes to deserialise a cached module. 
> Please let me know if there's a cleaner approach.
>
> Best,
> N
>

-- 
-- 
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/9c27c1ec-61c7-486c-abb5-138a2d7feac4n%40googlegroups.com.

Reply via email to