Skip to main content

epics_libcom_rs/runtime/
mod.rs

1//! The concurrency, timing, logging and OS-facing primitives an IOC is built
2//! on — C `libCom`'s `epicsThread` / `epicsTime` / `errlog` / `envDefs` half.
3//!
4//! # The two backends
5//!
6//! [`task`]'s spawn/sleep/interval seam has two mutually exclusive backends,
7//! selected by this crate's `build.rs` into one `cfg` rather than repeated as a
8//! target/feature predicate at each of the ~two dozen seam sites:
9//!
10//! * `tokio_backend` — the tokio runtime. The hosted default.
11//! * `exec_backend` — the std-thread [`background`] executor (callback pool +
12//!   delayed timer + scanOnce worker). Unconditional on RTEMS, which has no
13//!   tokio reactor, and host-selectable through the `rtems-exec-model` feature
14//!   for a Linux blocking-front-end deployment that wants the same
15//!   runtime-free backend.
16//!
17//! [`crate::EXEC_BACKEND`] states which one this build got, so a crate above
18//! can pin its own copy of the predicate to it.
19
20pub mod accept;
21pub mod background;
22pub mod blocking_io;
23pub mod build_info;
24pub mod env;
25pub mod env_table;
26pub mod epics_string;
27pub mod fs;
28pub mod general_time;
29pub mod ioc_role;
30pub mod json_string;
31pub mod log;
32pub mod net;
33pub mod socket;
34pub mod stdlib;
35pub mod supervise;
36pub mod sync;
37pub mod task;
38pub mod time;
39pub mod version;
40pub mod worker_pool;
41
42// Re-export tokio::select! macro through the runtime facade.
43pub use tokio::select;