Skip to content

@pumpkin-plugins/static-hermes-runtime API / hermes/toolchain-environment / setupHermesToolchainEnvironment

Function: setupHermesToolchainEnvironment() ​

setupHermesToolchainEnvironment(options): Promise<Record<string, string>>

Defined in: hermes/toolchain-environment.ts:145

Resolve or install the selected tools needed by a Static Hermes build.

Parameters ​

options ​

HermesToolchainSetupOptions

Workspace, environment, platform, cache, and tool-selection settings.

Returns ​

Promise<Record<string, string>>

Environment variables for the shared cache and each selected tool.

Remarks ​

The WASI SDK and wit-bindgen are selected by default. wasm-tools is opt-in so callers that only need Hermes preparation do not download it; component builds and WIT analysis enable it explicitly. Invalid cached wasm-tools binaries are removed and reinstalled while holding the shared toolchain lock. A configured WASM_TOOLS override is validated separately and is never removed by cache recovery.

Throws ​

If a configured tool is invalid, a platform has no pinned binary, or installation fails.

pumpkin-plugins documentation