Command line tool to extract information about your .wasm
files.
Running wasm-info with a sample wasm file should look like this.
wasm-info hello.wasm
{"exports":[{"name":"run","params":[],"results":[],"type":"WASM_EXTERN_FUNC"}],"imports":[{"name":"hello","params":[],"results":[],"type":"WASM_EXTERN_FUNC"}]}
If you want the json output to be pretty consider using a tool such as jq
.
wasm-info hello.wasm | jq
{
"exports": [
{
"name": "run",
"params": [],
"results": [],
"type": "WASM_EXTERN_FUNC"
}
],
"imports": [
{
"name": "hello",
"params": [],
"results": [],
"type": "WASM_EXTERN_FUNC"
}
]
}
wasm-info
was intended to be integrated into the tools that need it, but you might find it useful in your PATH
. Executables available on the releases page. If you want to get started quickly there are some install scripts available for your convenience.
iwr https://raw.githubusercontent.com/seaube/wasm-info/main/install.ps1 -useb | iex