async-flow 0.1.5

Async abstractions for flow-based programming (FBP).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
// This is free and unencumbered software released into the public domain.

use async_flow::{Result, System};

#[tokio::main(flavor = "current_thread")]
pub async fn main() -> Result {
    System::run(|s| {
        let stdin = s.read_stdin::<String>();
        let stdout = s.write_stdout::<String>();
        s.connect(stdin, stdout);
    })
    .await
}