Skip to content

Latest commit

 

History

History
52 lines (40 loc) · 1.28 KB

README.md

File metadata and controls

52 lines (40 loc) · 1.28 KB

wasm-info

Command line tool to extract information about your .wasm files.

Usage

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"
    }
  ]
}

Install

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.

Install on Windows (powershell)

iwr https://raw.githubusercontent.com/seaube/wasm-info/main/install.ps1 -useb | iex