Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/crates/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Useful crates

There is always new crates being released that can be useful in the development of command line applications.


## Crates referenced in this book

- [anyhow](https://crates.io/crates/anyhow) - provides `anyhow::Error` for easy error handling
- [assert_cmd](https://crates.io/crates/assert_cmd) - simplifies integration testing of CLIs
- [assert_fs](https://crates.io/crates/assert_fs) - Setup input files and test output files
Expand All @@ -23,9 +26,23 @@ There is always new crates being released that can be useful in the development
- [tokio](https://crates.io/crates/tokio) - asynchronous runtime
- [wasm-pack](https://crates.io/crates/wasm-pack) - tool for building WebAssembly


## Tables
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To explain the differences between these crates: should this be done in this useful crates section, or should this be done in subsections?

This should be a subsection of "Other crates" if we include it


There are a few libraries for pretty-printing tables to the console:

- [cli-table](https://crates.io/crates/cli-table)
- [comfy-table](https://crates.io/crates/comfy-table)
- [prettytable](https://crates.io/crates/prettytable-rs)
- [tabled](https://crates.io/crates/tabled)
- [term-table](https://crates.io/crates/term-table)
Comment on lines +34 to +38
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far, we only list out crates we directly use. We might want to give more thought to how we would want t talk about relevant crates more generally.

Can you open an issue for us to discuss this before merging this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.



## Other crates

Due to the constantly-changing landscape of Rust crates, a good place to find crates is the [lib.rs](https://lib.rs) crate index.
Here are a few specific categories that might be useful for building CLI's:

- [Command-line interface](https://lib.rs/command-line-interface)
- [Configuration](https://lib.rs/config)
- [Database interfaces](https://lib.rs/database)
Expand Down