moonwasm_probe

    CI-native WASM runtime environment probe. JSON output, env-var-driven checks. Designed for CI pipelines and automation scripts.

    wasm
    wasmtime
    wasmer
    wazero
    probe
    detection
    ci
    Download zip
    Author
    Version
    0.10.0
    License
    Apache-2.0
    Last updated
    4 months ago
    Downloads
    56

    #moonwasm_probe

    CI-native WASM runtime environment probe. JSON output designed for machine parsing.

    #Usage

    CLI output is always JSON. Exit code reflects environment checks.

    # Probe all runtimes (JSON stdout) moonwasm_probe # Check a specific runtime — exit 1 if not installed MOONWASM_CHECK=wasmtime moonwasm_probe # Check all runtimes — exit 1 if any missing MOONWASM_CHECK_ALL=1 moonwasm_probe

    #Output Format

    { "moon_version": "moon 0.1.20260512 ...", "runtimes": [ {"name": "wasmtime", "installed": false, "version": null, "path": null}, {"name": "node", "installed": true, "version": "v24.14.1", "path": "/usr/bin/node"} ], "missing": ["wasmtime", "wasmer", "wazero"], "all_installed": false }

    RuntimeProbe

    pub struct RuntimeProbe {
    name : String
    kind : RuntimeType
    installed : Bool
    version : String?
    path : String?
    }
    Result for a single runtime probe.

    RuntimeType

    pub enum RuntimeType {
    Wasmtime
    Wasmer
    Wazero
    Node
    Bun
    Deno
    }
    WASM runtime type detected on the system.

    WASMEnvReport

    pub struct WASMEnvReport {
    moon_version : String
    runtimes : Array[RuntimeProbe]
    }
    Overall WASM environment report.

    exit_process

    fn exit_process(code : Int) -> Unit
    Exit the process with a code.

    get_env

    fn get_env(name : String) -> String?
    Get an environment variable string.

    probe_all

    fn probe_all() -> WASMEnvReport
    Probe all supported WASM runtimes.

    report_to_json

    fn report_to_json(report : WASMEnvReport) -> String
    Serialize report to JSON string (CI-friendly, machine-parseable).