Skip to main content

Module node

Module node 

Source
Expand description

Canonical procedural seed nodes (Phase 11, ADR-0025).

A SeedNode describes one computation, not one storage slot: a bounded, versioned materializer over zero or more dependencies, producing a declared output kind and logical length. Nodes are canonically encoded (little-endian, length-prefixed, no serde) so that the same computation always hashes to the same NodeId regardless of platform or insertion order.

The node’s content_id is not stored inside the node: it is NodeId::of_node(canonical_bytes), which is what makes the graph content-addressed and immutable. Changing a dependency’s bytes yields a different dependency id, hence a different node id; there is no mutation.

Structs§

NodeLimits
A bounded resource envelope declared by a node.
SeedNode
One canonical procedural seed node.

Enums§

NodeKind
What a node computes. The numeric values are part of the canonical encoding.

Constants§

MATERIALIZER_VERSION
The materializer semantics version for v1.
MAX_NODE_BYTES
Recommended maximum canonical node size (framing discipline).
MAX_NODE_DEPS
Maximum dependency fanout of a single node.
NODE_MAGIC
Canonical header byte for the node encoding.

Functions§

object_params
Encode a (u32, u16, ...) object-identity parameter block: object, generation, then a trailing kind-specific u64.
read_object_params
Decode an object-identity parameter block.
read_span_params
Decode an [offset, len] parameter block.
read_u32_params
Decode a single u32 parameter.
span_params
Encode an [offset, len] parameter block.
u32_params
Encode a single u32 parameter.