Skip to main content

ExecMode

Enum ExecMode 

Source
pub enum ExecMode {
    Dev,
    Prod,
}
Expand description

The dev/prod execution mode (NS-A4, docs/stdlib-spec.md §4b, ruled 2026-07-18): the knob that decides WHERE execution stops on an unordered comparand — never WHAT values are fabricated.

The split is fenced to placement: it exists only where the prod behavior is defined, total, and fabricates no data. Ordering contexts qualify (sort/sorted/min/max; A7 adds heap_push): every element is preserved, the order is deterministic, saves/replay are safe. Fabrication never qualifies — int("potato"), OOB indexing stay always-fault in both modes. Effect rows are mode-independent (the checker doesn’t know modes exist).

  • Dev (the default — the Rust dev-profile analogy, like debug-build overflow checks): a float NaN comparand in an ordering context is a turn-terminating RuntimeError::UnorderedComparand fault, surfacing the upstream bug at its first ordering consumption.
  • Prod: the pinned non-fabricating total order applies — ordinary IEEE order with -0 == +0 as a tie, NaN greater than everything, NaN-vs-NaN ties (deliberately NOT IEEE totalOrder, whose -0 < +0 would split ordering from == on clean data). Execution keeps moving.

On NaN-free data the modes agree exactly and cohere with </==.

The knob’s home is project config (brink.toml profile) with a host-API override (ruled 2026-07-19; tooling wires the config side). This runtime mechanism is the host-API leg: set it via [Story::set_exec_mode] / [FlowInstance::set_exec_mode]. The mode is a host/build knob, not story state — it is never embedded in .inkb (mirroring dialect/types) and never persisted in saves.

Variants§

§

Dev

Fault on unordered comparands (NaN) in ordering contexts.

§

Prod

Keep moving: place NaN by the pinned non-fabricating total order.

Trait Implementations§

Source§

impl Clone for ExecMode

Source§

fn clone(&self) -> ExecMode

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ExecMode

Source§

impl Debug for ExecMode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ExecMode

Source§

fn default() -> ExecMode

Returns the “default value” for a type. Read more
Source§

impl Eq for ExecMode

Source§

impl PartialEq for ExecMode

Source§

fn eq(&self, other: &ExecMode) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ExecMode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.