Skip to main content
Verticopolis engineGitHub

Module identity

Module identity 

Source
Expand description

The engine’s identity record: which engine this is and which contracts it speaks (crate version, save version, frame, view and catalog layout versions, and the conformance lock’s digest), so a frontend, a bug report and a benchmark all name the same engine.

The record holds only what the engine knows about itself. Which build of the sources a binary came from is the packaging’s fact; the crate’s README describes the build metadata a host supplies for it.

let id = verticopolis_engine::identity::identity();
assert_eq!(id["crate"]["name"], "verticopolis-engine");
println!("{}", verticopolis_engine::identity::identity_json());

Constants§

CRATE_NAME
The crate’s name, as Cargo.toml spells it.
IDENTITY_SCHEMA
The record’s own shape. It moves when a field is added, renamed or removed.

Functions§

crate_version
The crate version, from compat-record.json.
identity
The identity record as a value.
identity_json
The record as canonical JSON, the text the JavaScript package returns.