Skip to main content

moonproof_runtime/ir/
value.rs

1//! Internal value type for expression evaluation.
2//!
3//! The interpreter carries `serde_json::Value` directly: witnesses
4//! come in as JSON, circuit args come in as `AlignedValue` (decoded
5//! into JSON via descriptors), and `Const` bindings hold whatever the
6//! bound expression evaluated to. Conversion to and from
7//! `AlignedValue` lives in [`super::descriptor`] (encoding) and
8//! [`crate::executable::aligned_value_to_json`] (decoding).
9//!
10//! This module is reserved for typed-Value extensions — when the
11//! interpreter grows beyond pass-through JSON (e.g. typed enums with
12//! sealed-class variants, `Field` arithmetic), this is where they
13//! land.