hydro_lang/sim/
mod.rs

1//! Deterministic simulation testing support for Hydro programs.
2//!
3//! See [`crate::compile::builder::FlowBuilder::sim`] and [`flow::SimFlow`] for more details.
4
5use std::marker::PhantomData;
6
7use serde::Serialize;
8use serde::de::DeserializeOwned;
9
10use crate::live_collections::stream::{Ordering, Retries};
11
12/// A receiver for an external bincode stream in a simulation.
13pub struct SimReceiver<T: Serialize + DeserializeOwned, O: Ordering, R: Retries>(
14    pub(crate) usize,
15    pub(crate) PhantomData<(T, O, R)>,
16);
17
18/// A sender to an external bincode sink in a simulation.
19pub struct SimSender<T: Serialize + DeserializeOwned, O: Ordering, R: Retries>(
20    pub(crate) usize,
21    pub(crate) PhantomData<(T, O, R)>,
22);
23
24#[cfg(stageleft_runtime)]
25mod builder;
26
27#[cfg(stageleft_runtime)]
28pub mod compiled;
29
30#[cfg(stageleft_runtime)]
31pub(crate) mod graph;
32
33#[cfg(stageleft_runtime)]
34pub mod flow;
35
36#[cfg(stageleft_runtime)]
37#[doc(hidden)]
38pub mod runtime;
39
40#[cfg(test)]
41mod tests;