CLI: hivec
Every SDK ships a hivec with the same four jobs: build a .hbc, inspect it, list its functions,
and run a function on ndsr. ndsr is found through --ndsr/-ndsr (where supported), $NDSR_BIN,
ndsr on PATH, or tools/ndsr in a parent directory.
hivec build [PATH] [OPTIONS] --example <EXAMPLE> Build this example of the crate instead of its library --name <NAME> Module name in the manifest [default: the cargo target / file name] -o, --out <OUT> Output directory [default: dist] --functions <FUNCTIONS> For a .wasm without a hivekit.functions section --language <LANGUAGE> manifest.language for a .wasm input [default: rust] --module-version <VERSION> Optional manifest.version --description <DESCRIPTION> Optional manifest.description --debug Build with the dev profile instead of --release --target-dir <TARGET_DIR> Cargo target directory
hivec inspect FILE.hbc [--json]hivec functions FILE # .hbc, .wasm or .rs source
hivec run <HBC> <FUNCTION> [INPUT] --input-file <INPUT_FILE> --gas <GAS> --data-dir <DATA_DIR> Persist state/ledger here --module <MODULES> Make another module callable via hive.call (repeatable) --ndsr <NDSR> Path to the ndsr binaryhivec build [flags] <package dir | file.go> -o DIR -name NAME -version V -description D -tinygo PATH -gc GC -keep-wasmhivec package [flags] <module.wasm> -o, -name, -version, -description; -functions a,b; -language L (default "go")hivec inspect <file.hbc>hivec functions <file.hbc | module.wasm | package dir>hivec run [flags] <file.hbc> <function> [input] -input-file F -gas N (default 1000000) -data-dir DIR -module F.hbc (repeatable) -ndsr PATH -local (built-in runner: no gas metering, no receipt)Go flags go before positional arguments.
hivec build [options] <source> -o, --out <dir> output directory (default: "dist") -n, --name <name> module name (default: file stem) --module-version <version> manifest version --description <text> manifest description -t, --target <target> "as" (AssemblyScript, default for .ts) or "js" (default for .js)hivec inspect <hbc>hivec functions <source>hivec run [options] <source|hbc> <fn> [input] --gas <n> gas limit (default: "1000000000") --data-dir <dir> persist state between runs (ndsr only) -t, --target <target> --local use the in-process Node host even if ndsr is availableSame CLI as the TypeScript tab (hivekit-js); .js, .mjs and .cjs default to --target js.
hivec build [OPTIONS] SOURCE -o, --out TEXT Output directory [default: dist] -n, --name TEXT Module name (default: file stem) --module-version TEXT Manifest version --description TEXT Manifest descriptionhivec inspect FILE.hbchivec functions SOURCEhivec run [OPTIONS] SOURCE FUNCTION_NAME [INPUT_TEXT] --gas INTEGER Gas limit (ndsr) [default: 1000000000] --data-dir TEXT Persist state between runs (ndsr) --local Run in this Python process instead of ndsr