0.1.5 • Published 6 years ago

describe-wasm v0.1.5

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

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));