Skip to content

krisselden/describe-wasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Reads interface info from a wasm file

Resources

Stars

Watchers

Forks

Packages

No packages published