Skip to main content

Module runtime

Module runtime 

Source
Expand description

Catalogs supplied at runtime, checked against their pinned digests.

A host that leaves the catalog out of its binary (the npm package does, to keep 1.4 MB out of every browser download) ships the per-edition snapshot files instead and hands their bytes to install. The bytes must hash to the edition’s pin (snapshot::pinned_sha256) or to the container’s (snapshot::CONTAINER_SHA256); anything else is refused, so a runtime catalog is the same data the embedded one is.

Installed catalogs live for the process (for a WebAssembly module, for the module instance). load_catalog reads them like crate::embedded::load_catalog reads the embedded ones, in the official or the corrected profile, and refuses an edition not installed yet with RuntimeCatalogError::NotInstalled.

Enums§

RuntimeCatalogError
Why a runtime catalog cannot be installed or read.

Functions§

decode_verified
Check bytes against edition’s pinned SHA-256, or the container’s, and decode that edition. Nothing is installed.
install
Install edition from snapshot bytes: its per-edition file, or the container. The bytes are checked against the pin before anything is decoded. Installing an edition already installed is a no-op that still checks the bytes.
is_installed
Whether edition has been installed.
load_catalog
An installed catalog in profile: CatalogProfile::Official, or CatalogProfile::Corrected for the editions with a built-in overlay (IFC4 ADD2 TC1, IFC4X3 ADD2), derived once and cached.