library_version
Stable constant · Versions and migration
Tier: stable · Kind: constant · Topic: Versions and migration
| Julia | TypeScript | Python | Rust | Go |
|---|---|---|---|---|
LIBRARY_VERSION | LIBRARY_VERSION | LIBRARY_VERSION | LIBRARY_VERSION | LibraryVersion |
Julia
const LIBRARY_VERSION::String
LIBRARY_VERSION
This package’s OWN version, read from its Project.toml — NOT the .esm
format version, which is SCHEMA_VERSION
. The two are unrelated
numbers.
TypeScript
const LIBRARY_VERSION: "0.6.0"
The package’s OWN version — distinct from SCHEMA_VERSION
, which is
the .esm FORMAT version this build implements. The two are unrelated
numbers; every binding exposes both, under these two names.
package.json is the source of truth. It cannot be imported here —
tsconfig’s rootDir is ./src, and a runtime read would break browser
hosts — so the value is mirrored, and version.test.ts fails the build if
the mirror drifts. Same arrangement Rust uses for its SCHEMA_VERSION.
Python
LIBRARY_VERSION: str = __version__
This package’s OWN version – the cross-binding spelling of __version__.
Distinct from SCHEMA_VERSION
, the .esm FORMAT version; the two are
unrelated numbers.
Example (version_constants)
print("format version:", earthsci_ast.SCHEMA_VERSION)
print("library version:", earthsci_ast.LIBRARY_VERSION)
assert earthsci_ast.SCHEMA_VERSION.count(".") == 2
Rust
pub const LIBRARY_VERSION: &str = "0.6.0";
This crate’s OWN version — NOT the .esm format version, which is
SCHEMA_VERSION
. The two are unrelated numbers. Every binding exposes
both, under these two names.
Example (version_constants)
// The `.esm` format version this library reads and writes, and the
// version of the library itself: two unrelated numbers.
println!("format {SCHEMA_VERSION}, library {LIBRARY_VERSION}");
assert_eq!(SCHEMA_VERSION.split('.').count(), 3);
Go
const LibraryVersion = "0.6.0"
LibraryVersion is this Go module’s OWN version — NOT the .esm format version, which is SchemaVersion. The two are unrelated numbers, and until this split Go exposed neither under a shared name while TypeScript and Rust both exported a VERSION that meant the SCHEMA version in one and the PACKAGE version in the other. Every binding now exposes exactly SchemaVersion and LibraryVersion.
Unlike the other four bindings, a Go module carries no in-tree version manifest — a module’s version is the git tag the proxy resolves — so there is nothing to derive this from and no file a test could pin it against. It is maintained by hand alongside the repo-wide release version, which the release process bumps in lockstep with the Julia Project.toml, the Rust Cargo.toml, the npm package.json and the Python pyproject.toml.