emscripten-core / emscripten-core/emscripten
Feature request: Load WASM things on-demand in JS glue
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
Hi team,
Thank you for the great work!
I'm trying to build a sort of script engine based on Emscripten so I can make it both run at browser and backend.
For backend, I want to reduce init time (load BIG JS glue and WASM which usually the big part for running simple user script), so I'm evaluting V8 snapshot feature work with Emscripten.
During a quick research it seems V8 snapshot can't manage WASM land, I can snapshot JS code (which certainty), but it will failed when JS code call `WebAssembly` methods such as `WebAssembly.memory` and `WebAssembly.instantize`, etc.
I see generated JS glue create `WebAssembly.memory` at the top level, so that made I can't get benefit from V8 snapshot.
is it possible to create or load `WebAssembly.memory` and other WebAssembly things on demand?
Contributor guide
Assessment
This issue has not been assessed yet.