pipecrab_runtime/lib.rs
1//! pipecrab-runtime: runtime-agnostic async orchestration built on `futures`.
2//!
3//! No async executor is baked in: the channels and run loop are plain
4//! `futures` primitives, so the caller drives them (`block_on` natively,
5//! `spawn_local` in the browser). Compiles for the host and
6//! `wasm32-unknown-unknown`.
7#![forbid(unsafe_code)]
8#![warn(missing_docs)]
9
10// Re-exported so [`maybe_async_trait!`] can reach `async_trait` through this
11// crate (`$crate::async_trait::…`); users of the macro need no direct
12// `async-trait` dependency. Hidden: an implementation detail of the macro, not
13// public API.
14#[doc(hidden)]
15pub use async_trait;
16
17pub mod inbound;
18/// Target-conditional `Send`/`Sync` bounds (`Send` native, vacuous on wasm).
19pub mod maybe;
20/// The [`offload`](offload::offload) helper for running blocking work off the
21/// orchestrator thread.
22pub mod offload;
23/// Typed send surface for a stage's output channels.
24pub mod outbound;
25/// The [`Pipeline`] builder and the per-stage preemptible run loop.
26pub mod pipeline;
27/// The [`Stage`] trait and its [`StageError`].
28pub mod stage;
29pub use inbound::{Inbound, Received};
30pub use maybe::{MaybeSend, MaybeSendSync};
31pub use offload::offload;
32pub use outbound::Outbound;
33pub use pipeline::{Pipeline, PipelineBuilder, PipelineEnds, link};
34pub use stage::{Stage, StageError};