Skip to main content

Module value

Module value 

Source
Expand description

Runtime values. All non-Atom values are immutable with structural sharing (shared-pointer clone-on-write). Atom is the only user-visible mutable cell; Cell is the internal slot used for captured let mut locals.

Values are Arc/Mutex-backed: Value, Funct and VmState are Send + Sync, so engines and paused states can move across threads and live in thread-safe containers. The flip side: registered natives must be Send + Sync and host types Send. (Benchmarked: the atomics cost is noise next to interpretation overhead.)

Modules§

shared
Shared-pointer and interior-mutability primitives. Everything else in the crate uses these aliases — they are the single seam to change if a non-thread-safe (Rc/RefCell) build is ever needed again.

Structs§

AtomCell
Closure
NativeValue
Variant

Enums§

Value
VariantPayload

Type Aliases§

FList
Persistent (structurally-shared) sequence: O(1) clone, ~O(log n) push/index, amortized O(1) push when uniquely owned. Backs both lists and tuples.
FMap
Persistent sorted map (structural sharing) backing records; keeps keys ordered, so keys()/iteration stay deterministic.