pub const RUNTIME_VERSION: &str = "0.1.0";Expand description
The version of the cove-runtime crate a program ran against —
CARGO_PKG_VERSION at build time, and nothing more than that.
This is not TRACE_FORMAT_VERSION: that one versions the shape of the
JSONL a trace is written as, and moves only when an event’s fields do,
which is rarely. This one moves with every release of the crate, whether
or not a single trace field changed, because what it answers is “which
build of the runtime ran this” rather than “can this reader parse what was
written”.
Issue #248 is why this exists:
an embedding that records enough to replay a run needs a
cove_runtime_version among what it records, and before this there was
nothing reachable from the embedding API to put there — only
TRACE_FORMAT_VERSION, which answers a different question, and the
interface hash cove-cli computes for its own package format, which is
pub(crate) and hashes declared signatures rather than a build. A version
genuinely is the runtime’s own to answer, and re-exporting the one Cargo
already stamps on every build costs nothing.
A replay identity needs one more thing this crate can answer and this
constant does not carry: which backend ran the program. Fuel is not
portable between Vm and the tree-walking interpreter, so a
version without a backend does not pin down a run. RecordingBackend
is that other half — already public, already spelled the way --backend
accepts — and a replay identity built from the embedding API is this
constant plus one of its variants, not a new string invented to match
them. What this constant deliberately does not attempt is a hash of the
program that ran: that identity is the embedding’s source or bytecode,
not the runtime’s, and only the embedding knows which of those it shipped
— folding it in here would answer a question that belongs one layer up.