Android module for running WebAssembly through androidx.javascriptengine.
This package exports a standard WebAssembly ponyfill for React Native. It is
designed as a drop-in replacement for browser-style WebAssembly.* usage, and
it keeps .wasm binaries out of the JS bundle by loading them from Metro
assets at runtime.
Public API
WebAssembly
Module
Instance
Memory
Table
Global
Tag
Exception
CompileError
LinkError
RuntimeError
makeImportClosure(...)
polyfillGlobalWebAssembly()
clearWasmHandles()
Asset loading
Treat .wasm files as Metro assets, then resolve the asset URI and pass the
bytes into WebAssembly.instantiate() or WebAssembly.compile().
If you want the ponyfill to be available on globalThis, call
polyfillGlobalWebAssembly() once during app startup.
Example app
The repository includes an emulator-ready app under example/ that exercises
the standard WebAssembly API, including asset-backed module loading and the WPT
compatibility harness.
Run the Metro server:
npm run example:start
Install and launch on Android:
npm run example:android
For the fastest local development loop, link the package into the example once
after installing dependencies:
npm run example:link
Tests
Unit tests currently live in test/assetUri.test.js and run with: