diff --git a/README.md b/README.md index ffa41578..85cc9a2e 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ cargo install --path . ## Command-line usage + ```bash mdtablefix [--wrap] [--renumber] [--breaks] [--ellipsis] [--fences] [--footnotes] [--in-place] [FILE...] ``` @@ -110,8 +111,8 @@ A brief intermission for pizza. ## Library usage -The crate provides helper functions for embedding the table reflow logic in -your own Rust project: +The crate exposes helper functions for embedding the table-reflow logic in +Rust projects: ```rust use mdtablefix::{process_stream_opts, rewrite, Options}; diff --git a/docs/parallel-processing-roadmap.md b/docs/parallel-processing-roadmap.md new file mode 100644 index 00000000..4ab98234 --- /dev/null +++ b/docs/parallel-processing-roadmap.md @@ -0,0 +1,23 @@ +# Roadmap for Parallel File Processing + +The command-line tool currently processes input files sequentially. The steps +below outline the work required to allow concurrent processing while preserving +serial output order. + +- [ ] **Adopt `rayon` for concurrency** + - Use `rayon` thread pools to spawn work for each file path. + - Ensure the approach integrates cleanly with existing modules. +- [ ] **Add chosen crate to `Cargo.toml`** + - Pin an explicit version and document the decision in `docs/`. +- [ ] **Refactor `main.rs` to launch parallel tasks** + - Spawn a worker for each file path using the concurrency crate. + - Maintain a list of handles so outputs can be gathered in order. +- [ ] **Collect results sequentially** + - Await or join handles in the same order the files were supplied. + - Print each processed file or error message before moving to the next. +- [ ] **Extend tests for parallel execution** + - Use `rstest` to verify that processing many files yields correct results. + - Add tests exercising error handling when some paths are invalid. +- [ ] **Update documentation** + - Document the new flags or behaviour in `README.md` and module docs. + - Note any concurrency caveats or performance implications.