Menci / vite-plugin-wasm

Add WebAssembly ESM integration (aka. Webpack's `asyncWebAssembly`) to Vite and support `wasm-pack` generated modules.
MIT License
281 stars 16 forks source link

[feature request] Support SharedArrayBuffer #43

Closed 2A5F closed 10 months ago

2A5F commented 10 months ago
const memory = new WebAssembly.Memory({
  initial: xxx,
  maximum: xxx,
  shared: true,
});

const __vite__wasmModule = await __vite__initWasm({
    memory,
    ...
}, __vite__wasmUrl);