@lynx-example/webassembly
v0.2.0
Published
An example shows how to run WebAssembly in Lynx
Readme
WebAssembly
This example runs a minimal WebAssembly module in the Lynx background runtime.
Tap the button in LynxExplorer to calculate 1 + 2. The exported add function comes from WebAssembly bytes and is loaded with the constructor-based API:
const module = new WebAssembly.Module(wasmBytes);
const instance = new WebAssembly.Instance(module);Getting Started
Install dependencies from the repository root:
corepack enable
pnpm installThen run the example:
pnpm --filter @lynx-example/webassembly run devScan the QRCode in the terminal with your LynxExplorer App to see the result.
