Skip to main content

Module guard

Module guard 

Source
Expand description

guard — Portability Guard (assert_portable).

DSL-agnostic IR portability invariant: a portable IR must not contain non-serializable values. In Rust the runtime works over serde_json::Value (already JSON-serializable) plus the native crate::value::Value, so the only structurally non-portable case is a non-finite float (NaN/±Inf) which cannot be represented in JSON. assert_portable walks a value and rejects it.

Structs§

PortabilityError

Constants§

PORTABLE_EXPR_OPERATORS
The closed set of Expression-IR operators allowed in a portable IR (expression-ir.md §3).
PORTABLE_SCALAR_TYPES
The closed set of scalar types in the portable type notation (scp-ir-architecture.md §5.2, bc#44 B0). Compound types are the single-key objects {opt|arr|obj: ...}.

Functions§

assert_portable
Assert that a runtime Value is portable (JSON-serializable). The only non-portable scalar in the Rust value model is a non-finite float.
assert_portable_component_graph
Portability Guard for a component-graph IR (scp-ir-architecture.md §5), operating on the raw serde_json::Value IR (P0-2). Enforces, fail-closed: