@premai/bare-wasm3
v0.1.4
Published
WebAssembly polyfill for Bare using wasm3, wasm-bindgen compatible
Readme
bare-wasm3
A Bare addon that ships a WebAssembly
implementation backed by wasm3, patched to be wasm-bindgen compatible.
Usage
Inside a Bare worklet, install the polyfill before any code that touches
WebAssembly:
require('bare-wasm3/global')
const mod = new globalThis.WebAssembly.Module(wasmBytes)
const inst = new globalThis.WebAssembly.Instance(mod, imports)You can also use the lower-level API directly:
const { Module, Instance } = require('bare-wasm3')Build
Requires macOS with Xcode, bun, and quilt (for applying
the wasm3 patches).
# install dependencies
brew install quilt
bun install
# build all targets
bun run build
# or build a single target
bun run build:ios-arm64-simulatorLicense
See LICENSE.
