4 ms·
What's the best way to include a binary blob (wasm binary) in your package? For NPM I've been using a bundler (esbuild's `binary` loader) but I'm not sure of th
by grose 3y ago
What's the best way to include a binary blob (wasm binary) in your package? For NPM I've been using a bundler (esbuild's `binary` loader) but I'm not sure of the best way to do that in a modern, jsr-friendly way.
- alex_suzuki 3y agoIf you‘re using emscripten, check out the SINGLE_FILE option, that embeds the WASM as a base64-encoded string into the JS.
- lucacasonato 3y agoWe will soon support WASM imports (`import source foo from "./foo.wasm"`). [1] [1]: https://github.com/tc39/proposal-source-phase-imports https://github.com/tc39/proposal-source-phase-imports
- grose 3y agoExcellent, this will make my life easier. Thanks!