Documentation
¶
Overview ¶
Package javybin resolves a `javy` CLI binary matching the Javy version the vendored QuickJS plugin was emitted from (chassis/compute/javyplugin). The op build path (chassis/cli/op) needs javy to compile JS/TS nano-ops to wasm, but we don't want users to install it by hand — so Resolve transparently downloads the pinned release into the txco home on first use and caches it.
Resolution order (first hit wins):
- $TXCO_JAVY — an explicit binary path the operator chose; trusted as-is.
- A `javy` already on PATH whose `--version` matches the pin — respected so we never download when a correct toolchain is already present.
- A previously downloaded managed binary under <txco-home>/tools/.
- A freshly downloaded release, checksum-verified against its .sha256.
The managed binary is version-stamped in its filename, so a Javy bump (new pin) lands a new file rather than silently reusing an incompatible one.
Index ¶
Constants ¶
const Version = javyplugin.JavyVersion
Version is the Javy toolchain Resolve targets — pinned to the vendored plugin so built modules' bytecode always matches what the runtime links.
Variables ¶
ErrUnavailable wraps every terminal failure to obtain javy (unsupported platform, offline with no cached/PATH binary, checksum mismatch). Callers classify it distinctly from a genuine compile error — e.g. the demo server surfaces it as "compile_unavailable" with an install hint.
Functions ¶
Types ¶
This section is empty.