npm.io
0.1.5 • Published 8 years ago

describe-wasm

Licence
MIT
Version
0.1.5
Deps
0
Vulns
0
Weekly
0

describe-wasm

Reads the interface info (imports, exports, and their signatures) from a wasm file.

Useful for generating type declarations.

function describeWasm(wasmbuffer: Uint8Array): WasmInfo;

Example

import * as fs from "fs";
import describeWasm from "describe-wasm";

const wasmInfo = describeWasm(fs.readFileSync("mylib.wasm"));

console.log(JSON.stringify(wasmInfo, null, 2));

Keywords