Consider support for inline buffer of webassembly memory
Author: tmpfsCreated Jul 19, 2023Updated Apr 28, 2026
Thanks for wasm-pack, it's really great!
Feature description
In some restricted environments (for example, SES) the fetch() function may not be available and it would be desirable to instantiate the webassembly from an inline ArrayBuffer instead.
Would it be possible to add an option to the build command (eg: --inline) that would write the bytes for the webassembly into the compiled Javascript file rather than fetch over the network?
I would be willing to contribute to this if the feature is deemed worthwhile
Source: wasm-bindgen/wasm-pack