pub struct RuntimeConfig {
pub workers: usize,
pub quantum: u32,
pub mailbox: MailboxConfig,
pub max_flows: u32,
pub trust: TrustLevel,
pub output: Arc<dyn OutputSink>,
pub quota: QuotaConfig,
pub jit: JitConfig,
}Expand description
Tunables for Runtime::new. Everything has a sensible default via
RuntimeConfig::default so the common case is Runtime::new(chunk).
Fields§
§workers: usizeNumber of worker OS threads. Defaults to the number of logical CPUs — one worker per core is the right starting point for a CPU-bound M:N scheduler; embedders running alongside other CPU-heavy work on the same machine may want fewer.
quantum: u32Instructions a flow runs before being preempted back to the
scheduler even if it never hits Yield.
mailbox: MailboxConfigMemory + overflow contract applied to every flow mailbox
spawned by this runtime (bytecode Spawn and host spawn).
See MailboxConfig / docs/mailbox.md.
max_flows: u32Hard cap on concurrently live flows (0 = unlimited).
Checked on every host and bytecode spawn.
trust: TrustLevelConstant-pool trust for crate::verify_with at runtime construction.
Default is crate::TrustLevel::Untrusted (fail closed).
output: Arc<dyn OutputSink>Where bytecode print (native index 0) writes when using
crate::std_native_table_with. Ignored if you supply your own table.
quota: QuotaConfigPer-flow CPU / memory / spawn-send rate budgets.
jit: JitConfigjit only.Trace JIT settings (feature = "jit"). Ignored when the feature is off.
Trait Implementations§
Source§impl Clone for RuntimeConfig
impl Clone for RuntimeConfig
Source§fn clone(&self) -> RuntimeConfig
fn clone(&self) -> RuntimeConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more