unwasm provides a suite of universal WebAssembly (Wasm) tools for JavaScript, designed to simplify the integration of `.wasm` modules across various JavaScript runtimes, frameworks, and build environments. It currently stands at version 0.5.3, with a release cadence that includes frequent patch and minor updates. The project's core mission is to align with the WebAssembly/ES Module Integration proposal while maintaining broad compatibility with existing ecosystem libraries. Its key differentiators include automated resolution of WebAssembly imports, dynamic generation of code bindings tailored for bundlers, and a flexible API supporting both static and dynamic `.wasm` module imports. This includes explicit support for import objects and direct `WebAssembly.Module` instances via a `?module` suffix, catering to environments both with and without top-level `await` capabilities.
npm install unwasmVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates the JavaScript API for interacting with WebAssembly modules after they have been processed by unwasm's build-time integration. It showcases both static and dynamic imports, including initialization with an import object, and the subsequent calling of exported WebAssembly functions.
Refactor your codebase to use ES Modules (import/export syntax) for unwasm and any imported .wasm files.
Always call and await the default 'init' function (e.g., `initRand`) with the required import object before attempting to call any named exports from the `.wasm` module.
Review your application's WebAssembly instantiation logic, especially in environments where specific module mode handling was previously implemented. Ensure compatibility with the new automatic fallback behavior.
Switch to ES module `import` syntax. For example, `import { Name } from 'pkg'` instead of `const Name = require('pkg');`Ensure the default 'init' function (e.g., `initRand`) for the `.wasm` module is called and awaited with its import object before attempting to use any of its named exports.
No dependency data recorded yet.