Expand description
The W272 mesofact bundle format — the content-addressed unit a mesofact
app distributes as, plus (behind the store feature) the R2 blob store that
publishes and materializes it.
A bundle is one immutable, content-addressed directory shape:
<bundle>/
manifest.toml # identity + runtime selection
app/ # routes/config + built TS/assets
bins/<triple>/serve # ONLY when runtime = "self"# manifest.toml
schema_version = 1
name = "yah-marketing"
runtime = "mesofact/0.8.18" # vanilla: resolve stock runtime from node cache
# runtime = "self" # custom: bins/<triple>/serve ships in the bundle
[content]
"app/mesofact.routes.ts" = "b3f1…" # path → blake3, one row per fileThere is exactly one format; “vanilla” is the degenerate case where
runtime = "mesofact/<ver>" and no bins/ are carried. Immutability is the
whole coherence story: any change produces a new BundleManifest::digest,
“update” is publish-new-digest + drain-old, and rollback is a pointer flip.
This crate is deliberately light: the default feature set is serde + blake3
- toml only, so the
mesofact-buildsubcamp (R599-F2, a separate Cargo workspace) can link it to emit manifests without dragging the object-store / reqwest stack across the boundary. Thestorefeature adds that surface for the cloud publish path (R599) and kamaji node materialize (R599-F4).
Home of R599-F1 (the W272 bundle format + store) — the canonical @yah:
ticket annotation lives in oss/yubaba/crates/cloud/src/release_manifest.rs
to keep one block per ID; see W272 for the design.
Structs§
- Bundle
Hash - A BLAKE3 content hash: exactly 64 lowercase ASCII hex digits.
- Bundle
Manifest - The parsed
manifest.tomlat a bundle’s root — the bundle’s identity plus the per-file content map that makes it content-addressed.
Enums§
- Bundle
Error - Error surface for parsing / hashing a bundle manifest. The
storefeature adds I/O + object-store variants (seestore.rs). - Bundle
Runtime - Which runtime serves a bundle — the
runtime = "..."manifest field.
Constants§
- SCHEMA_
VERSION - Bundle-manifest schema version. Bumping this is a wire-format change: the
materialize side rejects a manifest whose
schema_versionit does not know.
Functions§
- assemble_
bundle - Assemble a bundle tree at
destfromfiles, returning theBundleManifest. - assemble_
self_ bundle - Assemble a self-contained (
runtime = "self") bundle: the vanilla tree plusbins/<triple>/serve, so the node serves it with the binary the bundle carries and resolves no runtime asset at all. - assemble_
vanilla_ bundle - Assemble a vanilla bundle from a finished mesofact build:
app/holds the routes file plus the builtdist/tree, nobins/, andruntime = "mesofact/<runtime_version>"so the node resolves the stock serve runtime. - blob_
key - Object-store key for a content blob:
blobs/<blake3>. Every file across every bundle dedupes on this key — two bundles sharing a byte-identical file share the one blob. - collect_
dir - Recursively enumerate the regular files under
dir, mapping each to a bundle path"<prefix>/<relative-path>". Results are sorted for determinism. - manifest_
key - Object-store key for a bundle manifest:
manifests/<digest>. Immutable — the digest is derived from the manifest, so re-publishing an identical bundle writes the same key with the same bytes.
Type Aliases§
- Bundle
File - One file destined for a bundle:
(path within the bundle, source on disk). The bundle path is always relative and forward-slashed, e.g."app/dist/index.html"or"bins/x86_64-unknown-linux-musl/serve".