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

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.