Skip to main content

sim_lib_stream_combinators/
lib.rs

1#![forbid(unsafe_code)]
2#![deny(missing_docs)]
3//! Lazy in-memory combinators for SIM stream packets.
4//!
5//! This crate composes stream-core packet spines without talking to devices,
6//! files, or transports. Runtime surfaces lower graph forms into these
7//! Rust-level combinators.
8
9mod bridge;
10mod cell;
11pub mod cookbook;
12mod event_algebra;
13mod ops;
14mod recording;
15mod stream;
16
17pub use bridge::{event_rate_gate, jitter_buffer, latency_comp_delay, resample_pcm};
18pub use cell::{CellSnapshot, StreamCell, stream_cell};
19pub use cookbook::pipeline_stages_demo;
20pub use event_algebra::{
21    event_join_data_kind, expr_path, filter_data_field_eq, join_data_on_field,
22    model_event_data_kind, project_data_field, rank_data_by_i64_field, rank_frontier_data_kind,
23    redact_data_field,
24};
25pub use ops::{
26    ClockConvertedStream, StreamStage, clock_convert, fan, filter, filter_data_kind,
27    filter_data_kind_stage, filter_data_shape, filter_data_shape_stage, filter_stage, identity,
28    map, map_data_expr, map_data_expr_stage, map_stage, merge, merge_by_clock, pipe, run_bang,
29    stream_window_data_kind, take, take_stage, tap, tap_diagnostics, tap_diagnostics_stage,
30    tap_stage, window_by_count, window_by_count_stage,
31};
32pub use recording::{
33    DEFAULT_RECORD_ITEM_LIMIT, SeekTarget, StreamRecording, record_bang, record_bang_bounded,
34    record_cassette_bang, record_cassette_bang_bounded, record_events, record_ledger_run,
35    record_ledger_slice, replay, replay_cassette, seek,
36};
37pub use stream::{Stream, StreamNode};
38
39/// Cookbook recipes for this lib, embedded at build time.
40pub static RECIPES: sim_cookbook::EmbeddedDir =
41    include!(concat!(env!("OUT_DIR"), "/cookbook_recipes.rs"));
42
43#[cfg(test)]
44mod bridge_tests;
45
46#[cfg(test)]
47mod event_algebra_tests;
48#[cfg(test)]
49mod tests;