coroflow
Composable Flow utilities inspired by Kotlin's Flow API, built on top of rs_coroutine_core for coroutine-style structured concurrency in Rust.
Features
- Cold
Flow<T>builders that only execute when collected. - Hot
SharedFlow<T>andStateFlow<T>for broadcasting values. - Rich operators including
map,filter,take,buffer,flow_on, andflat_map_latest. - Conversion from suspending computations via
SuspendingExt::as_flow.
Installation
Add coroflow and its companion runtime to your Cargo.toml:
[]
= "0.1.1"
= "0.1.1"
= { = "1.35", = ["full"] }
Example
Create and collect a simple flow with operators:
use ;
async
For more examples, run cargo run --example basic_usage from the workspace root.
License
MIT OR Apache-2.0