#[non_exhaustive]pub struct Config {
pub iteration_profile: IterationProfile,
pub effect_domain: u64,
pub fuel_limit: Option<u64>,
pub max_objects: u32,
pub auto_gc: bool,
pub gc_min_debt: u64,
pub max_logical_heap: u64,
pub max_stack_slots: u32,
pub max_string_bytes: u64,
pub max_snapshot_bytes: u64,
pub entropy: u64,
pub gc_mode: GcMode,
}Expand description
Runtime configuration, resource limits, and deterministic execution policy.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.iteration_profile: IterationProfileOrder used by next, plain pairs, and host raw traversal. Defaults
to IterationProfile::InsertionOrder; ipairs and __pairs are unchanged.
effect_domain: u64The host-selected lineage shared with the journal.
fuel_limit: Option<u64>An optional total execution fuel bound; restore rewinds the consumed counter.
None allows up to u64::MAX total fuel. Further fueled work terminates
with FuelLimitExceeded; the counter never wraps.
max_objects: u32Bound on live objects, in all kinds together (ADR 0052): an allocation past it raises a Lua memory error. Clamped to 1..=2^28.
auto_gc: boolCollect garbage automatically at safe points (ADR 0021).
gc_min_debt: u64Smallest allocation, in logical bytes, between automatic collections.
max_logical_heap: u64Hard quota on the logical heap, in logical bytes (ADR 0025). An allocation that would pass it raises a Lua memory error. Clamped to 1..=2^31 (ADR 0052).
max_stack_slots: u32Bound on each thread’s stack, in value slots (ADR 0028). A call or result that would pass it raises a Lua “stack overflow”. Clamped to 1,024..=100,000.
max_string_bytes: u64Bound on one string’s length, in bytes (ADR 0052). A string is also bounded by the quota; by default only by the quota. Clamped to 1,024..=2^30.
max_snapshot_bytes: u64Bound on a snapshot this runtime writes, in bytes (ADR 0052): a
larger one is refused with SnapshotError::LimitExceeded. Host
policy, not snapshot state. Clamped to 4,096..=2^31.
entropy: u64Start of the deterministic entropy stream that seeds math.random
(ADR 0032): the same value gives the same random numbers.
gc_mode: GcModeThe collector’s mode at boot (ADR 0051); Lua’s
collectgarbage("incremental") and ("generational") change it.