wasm-pack
wasm-pack copied to clipboard
Consider support for inline buffer of webassembly memory
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 👍