Skip to main content

molframe_core/execution/
mod.rs

1//! Bounded execution contracts for streaming and out-of-core work.
2//!
3//! Producers are pulled one batch at a time. Each pull carries explicit row and
4//! byte demand, while retained memory is charged to a shared budget through an
5//! RAII reservation. This keeps live workspace proportional to concurrent batch
6//! demand rather than total input size. Cancellation and storage policy travel
7//! in the same cheap-to-clone context.
8
9pub(crate) mod admission;
10mod batch;
11mod cancellation;
12mod context;
13mod memory;
14mod retained;
15pub(crate) mod spill;
16mod storage;
17#[cfg(not(target_arch = "wasm32"))]
18mod workspace;
19pub use retained::Retained;
20
21pub use batch::BatchBufferPool;
22pub use batch::{Backpressure, Batch, BatchDemand, BatchLease, BatchSource};
23pub use cancellation::{CancellationToken, Cancelled};
24pub use context::{ContextError, ExecutionContext, ExecutionContextBuilder};
25pub use memory::{
26    DEFAULT_MEMORY_BUDGET_BYTES, MAX_AUTOMATIC_BUDGET_BYTES, MEMORY_BUDGET_ENV,
27    MEMORY_BUDGET_REMEDY, MemoryBudget, MemoryBudgetError, MemoryReservation,
28};
29pub use spill::{SpillArtifact, SpillError, SpillFile, SpillReader};
30pub use storage::{ScratchPolicy, TempStoragePolicy};
31#[cfg(not(target_arch = "wasm32"))]
32pub use workspace::TemporaryWorkspace;