marigold/lib.rs
1//! Marigold is a domain specific language for data pipelining and analysis. It compiles to
2//! asynchronous Rust and can be integrated into Rust programs using a macro.
3//!
4//! ## Example Usage
5//!
6//! ```rust
7//! # #[tokio::main]
8//! # async fn main() {
9//! use marigold::m;
10//! # use marigold::marigold_impl::StreamExt;
11//!
12//! let odd_digits = m!(
13//! fn is_odd(i: &i32) -> bool {
14//! i.wrapping_rem(2) == 1
15//! }
16//!
17//! range(0, 10)
18//! .filter(is_odd)
19//! .return
20//! ).await.collect::<Vec<_>>().await;
21//!
22//! assert_eq!(odd_digits, vec![1, 3, 5, 7, 9]);
23//! # }
24//! ```
25#![forbid(unsafe_code)]
26
27pub use crate as marigold; // used so that the tests can reference re-exported values
28pub use marigold_impl;
29
30pub use marigold_macros::marigold as m;