Crates.io | par-dfs |
lib.rs | par-dfs |
version | 0.0.7 |
source | src |
created_at | 2022-09-16 12:24:46.963011 |
updated_at | 2022-09-16 16:47:01.032678 |
description | Parallel, serial, and async dfs and bfs traversal |
homepage | https://github.com/romnn/par-dfs |
repository | https://github.com/romnn/par-dfs |
max_upload_size | |
id | 667327 |
size | 111,145 |
Parallel, serial, and async DFS and BFS traversal iterators in Rust.
[dependencies]
par-dfs = "0"
For usage examples, check the examples and documentation.
cargo run --example async_fs --features async -- --path ./
cargo run --example sync_fs --features sync,rayon -- --path ./
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features
cargo clippy --tests --benches --examples -- -Dclippy::all -Dclippy::pedantic
cargo install cargo-criterion
# full benchmark suite
cargo criterion --features full
# sync benchmarks only
cargo criterion --features sync -- sync
# dfs benchmarks only
cargo criterion --features full -- dfs
Benchmark reports from CI are published are available here.
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.