Skip to main content

Module render

Module render 

Source
Expand description

The normalized differential render (deep-forcing, error-propagating) the sui↔sui differential + the SUI_IR shadow-eval latch byte-compare against eval_ir. Must stay format-locked with sui_ir::render. The tree-walker’s normalized differential render.

Renders an evaluated Value to the ONE normalized textual form the sui↔sui differential (sui-ir/tests/eval_differential.rs) and the SUI_IR shadow-eval latch (sui eval) byte-compare against eval_ir’s sui_ir::render::render_ir_value: CppNix float format, sorted attrs, the walker’s string escaping, raw (unquoted) paths, and a shared depth cap so an infinitely-deep value renders byte-identically on both engines (a match, never a stack overflow). Deep-forcing + error-propagating (unlike Display, which swallows a failed force — the differential must see errors as errors).

Promoted from the test-only sui-ir/tests/common/render.rs into shippable code so the walker’s authoritative result can be compared to a shadow eval_ir result live. The cap + escaping MUST match sui_ir::render::{MAX_RENDER_DEPTH, DEEP_SENTINEL, escape_str}.

Constants§

DEEP_SENTINEL
The identical marker both engines emit past MAX_RENDER_DEPTH.
MAX_RENDER_DEPTH
Render-recursion depth cap — must equal sui_ir::render::MAX_RENDER_DEPTH.

Functions§

escape_str
The walker’s Display string escaping.
render_tree
Render a tree-walker Value to the normalized differential form.