par-dfs

Crates.iopar-dfs
lib.rspar-dfs
version0.0.7
sourcesrc
created_at2022-09-16 12:24:46.963011
updated_at2022-09-16 16:47:01.032678
descriptionParallel, serial, and async dfs and bfs traversal
homepagehttps://github.com/romnn/par-dfs
repositoryhttps://github.com/romnn/par-dfs
max_upload_size
id667327
size111,145
Roman Dahm (romnn)

documentation

README

par-dfs

build status test status benchmarks crates.io docs.rs

Parallel, serial, and async DFS and BFS traversal iterators in Rust.

[dependencies]
par-dfs = "0"

Usage

For usage examples, check the examples and documentation.

Examples

cargo run --example async_fs --features async -- --path ./
cargo run --example sync_fs --features sync,rayon -- --path ./

Documentation

RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features

Linting

cargo clippy --tests --benches --examples -- -Dclippy::all -Dclippy::pedantic

Benchmarking

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.

Acknowledgements

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.

TODO

  • maybe merge the FastNode and Node traits
  • add examples in the documentation
Commit count: 39

cargo fmt