@wasmer/wasm-transformer
It helps to run WebAssembly modules in Browsers that doesn't have Wasm BigInt support

version

version(): string
Exported function that returns a string of the current version of the package.
1
import { version } from "wasm-transformer";
2
​
3
console.log(version()) // x.x.x
Copied!

lowerI64Imports

lowerI64Imports(wasmBinaryWithI64Imports: Uint8Array): Promise<Uint8Array>
Exported Function to insert trampoline functions for imports that have i64 params or returns. This is useful for running Wasm modules in browsers that do not support JavaScript BigInt -> Wasm i64 integration. Especially in the case for i64 WASI Imports. Returns or resolves the lowered Wasm binary as a Uint8Array.
1
import { lowerI64Imports } from "@wasmer/wasm-transformer";
2
​
3
const transformWasmModuleBytes = async () => {
4
const myWasmModuleBytes = new Uint8Array([ ... ]);
5
const loweredWasmModuleBytes = await lowerI64Imports(myWasmModulesBytes);
6
};
7
transformWasmModuleBytes();
Copied!
Last modified 2mo ago
Copy link