Skip to main content

logicaffeine_runtime/
lib.rs

1#![doc = include_str!("../README.md")]
2
3pub mod channel;
4pub mod config;
5// The work-stealing M:N driver is a standard part of the native runtime — it is
6// always available off-WASM. It is excluded only on `wasm32`, where there are no
7// OS threads (the cooperative M:1 driver is the browser's only option). This is a
8// target gate, NOT an opt-in Cargo feature: genuine multicore is not optional.
9#[cfg(not(target_arch = "wasm32"))]
10pub mod executor;
11pub mod payload;
12pub mod scheduler;
13pub mod seed;
14pub mod task;
15
16pub use channel::ChanId;
17pub use config::{ClockMode, SchedulePolicy, SchedulerConfig};
18pub use payload::RtPayload;
19pub use scheduler::{
20    run_with_seed, run_with_trace, ChanView, RunOutcome, SchedSnapshot, Scheduler, TaskStateKind,
21    TaskView,
22};
23pub use seed::{ChoiceKind, ChoicePoint, Chooser, SchedSeed, SchedTrace, SeededRng};
24pub use task::{SelectArm, Task, TaskCtx, TaskId, TaskStep};
25
26#[cfg(not(target_arch = "wasm32"))]
27pub use executor::{run_workstealing_seeded, FuncIdx, SpawnDesc, WsOutcome};