Skip to main content

Module binding

Module binding 

Source
Expand description

Canonical manifest bindings — what ties a content root to an identity.

A binding names (spool, facet, owner, content_root). The owner descriptor is deliberately outside the content root: every state and attachment has a distinct owner hash, while a context-only state must reuse its parent’s content root byte-for-byte. Keeping owner identity in the binding is what makes that reuse possible.

Facet identity follows the ratified weft #358 decision: every spool carries all four facets (content, governance, membership, children) uniformly, with no content-bearing discriminant, so a binding always names its facet explicitly rather than defaulting. The tokens match heddle_refs::SpoolFacet::token() exactly — this type exists only because the object model sits below the refs crate, not to introduce a second spelling.

Mutable facts stay out. Audience and visibility, the current head, and pack locations are control-plane data resolved after authorization; changing who may see a state must not rewrite a single content byte.

binding: "WPMB" | u8(version=1) | u16(spool_len) | spool
                | u16(facet_len) | facet | u8(owner_kind)
                | [u8;32](owner_hash) | u64(owner_decoded_size)
                | [u8;32](content_root)

Structs§

ManifestBinding
An immutable (spool, facet, owner) -> content_root binding.
ManifestFacetParseError

Enums§

ManifestBindingDecodeError
ManifestFacet
The four uniform spool facets from weft #358, plus an open named tail.
ManifestOwnerKind
What a content root is bound to.

Constants§

MANIFEST_BINDING_MAGIC
Magic prefix on every canonical binding.
MANIFEST_BINDING_VERSION
The only binding format version this binary reads or writes.