Skip to content

@pumpkin-plugins/static-hermes-runtime API / wit/parser / readWitToolsDocument

Function: readWitToolsDocument() ​

readWitToolsDocument(witDir, options?): WitToolsDocument

Defined in: wit/parser.ts:14

Run the pinned wasm-tools WIT JSON command for one prepared WIT world.

Parameters ​

witDir ​

string

Prepared WIT directory containing the plugin world.

options? ​

Optional wasm-tools executable and command runner.

executable? ​

string

wasm-tools executable; defaults to WASM_TOOLS in the process environment.

run? ​

(executable, args) => string

Optional command runner for tests and embedded callers.

Returns ​

WitToolsDocument

The validated resolved WIT document.

Throws ​

If wasm-tools is unavailable, the command fails, or its JSON is invalid.

pumpkin-plugins documentation