bare-wasm
v0.1.1
Published
WebAssembly JavaScript API for Bare
Readme
bare-wasm
WebAssembly JavaScript API for Bare. Import the WebAssembly APIs you need from here rather than from the WebAssembly global, which may or may not be available.
npm i bare-wasmUsage
const { Module, Instance } = require('bare-wasm')
const module = new Module(bytes)
const instance = new Instance(module, imports)API
The exports mirror the WebAssembly namespace of the WebAssembly JavaScript API:
Module,Instance,Memory,Table,Global,Tag, andExceptionCompileError,LinkError, andRuntimeErrorvalidate(),compile(), andinstantiate()
Where the WebAssembly global is unavailable, such as when V8 runs without a JIT on iOS, the exports still load, but using them throws an error with the code WEBASSEMBLY_UNAVAILABLE.
License
Apache-2.0
