Parallel, serial, and async DFS and BFS traversal iterators in Rust.
toml
[dependencies]
par-dfs = "0"
For usage examples, check the examples and TODO
bash
cargo run --example async_fs --features async -- --path ./
cargo run --example sync_fs --features sync,rayon -- --path ./
bash
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features --no-deps
bash
cargo clippy --tests --benches --examples -- -Dclippy::all -Dclippy::pedantic
```bash cargo install cargo-criterion
cargo criterion --features full
cargo criterion --features sync -- sync
cargo criterion --features full -- dfs ```
The rayon::iter::ParallelIterator
implementation for the dynamically growing graph traversal is based on the amazing work in tavianator's blog post.
The implementation of futures_util::stream::Buffered
also greatly helped in the design of the async streams.
add
and add_all
to specify the depth themselves