Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Rust crates

FerroEHR’s openEHR specification layer is published on crates.io as eight standalone Rust crates, usable without the CDR. They are the same crates the server itself is built on: the spec types are generated deterministically from the official openEHR machine-readable artifacts (BMM/XSD/OpenAPI), and the engines (ADL, AQL, serialization runtimes) are hand-written against the vendored specification text.

CrateImplementsWhat it gives you
openehr-baseBASE 1.3.0Foundation + base types (identification, intervals, ISO-8601 types)
openehr-rmRM 1.2.0The Reference Model: COMPOSITION, data structures/types, change control, generated invariant validation, the static RM attribute model
openehr-amAM 1.4 + 2.4The Archetype Object Model, both generations (am14/am24)
openehr-adlADL 2.4ADL2/cADL/ODIN parser, AOM2 validation, flattener, OPT2, ADL 1.4→2 conversion
openehr-termTERM 3.1.0Terminology model + the embedded official openEHR terminology (five languages)
openehr-langLANGThe BMM meta-model (both generations) + an ODIN parser
openehr-queryQUERY 1.1AQL lexer, parser, and typed AST
openehr-itsITS-REST 1.1.0Canonical JSON + XML codecs, the generated ITS-REST contract, OPT 1.4, Simplified Data Formats (FLAT/STRUCTURED/Web Template)
[dependencies]
openehr-rm = "0.0.1"
openehr-its = "0.0.1"

Versioning

The package version is the crates’ own independent SemVer line — it tracks this implementation’s code and moves freely with fixes and improvements, never with the vendored openEHR specification versions. While the line is 0.0.x, expect breaking changes between releases, which always ship in lockstep across all eight crates.

The implemented specification version is independent of the package version and always available at runtime:

#![allow(unused)]
fn main() {
assert_eq!(openehr_rm::SPEC_VERSION, "1.2.0");
}

Licensing

The Rust code is MIT. Crates that embed material derived from the official openEHR machine-readable artifacts (generated types with spec doc text, the terminology XML, the ITS-JSON schema) are MIT AND Apache-2.0, with both license texts shipped in the package. The openEHR specifications themselves are © the openEHR Foundation.