Skip to content

prem-research/bare-wasm3

Repository files navigation

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-simulator

License

See LICENSE.

About

WebAssembly where it shouldn't run. A wasm3-powered WebAssembly polyfill for Bare worklets.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors