Hydroflow Surface Syntax

The natural way to write a Hydroflow program is using the Surface Syntax documented here. It is a chained Iterator-style syntax of operators built into Hydroflow that should be sufficient for most uses. If you want lower-level access you can work with the Core API documented in the Architecture section.

In this chapter we go over the syntax piece by piece: how to embed surface syntax in Rust and how to specify flows, which consist of data sources flowing through operators.

As a teaser, here is a Rust/Hydroflow "HELLO WORLD" program:

#![allow(unused)]
fn main() {
use hydroflow::hydroflow_syntax;

pub fn test_hello_world() {
    let mut df = hydroflow_syntax! {
        source_iter(vec!["hello", "world"])
            -> map(|x| x.to_uppercase()) -> for_each(|x| println!("{}", x));
    };
    df.run_available();
}
}