Book: Chapter on "writing robust CLI applications"
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Documentation
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- rust
- Domain
- cli, documentation
Research direction
No target file or test is named. Review the book's existing chapter structure and the linked pull request discussion first, then define the chapter scope around the listed robustness topics. Done means the agreed in-depth guidance is added to the book and fits its existing organization.
Written by the indexing model from the issue text.
Description
Inspired by @vorner's comment (https://github.com/rust-lang-nursery/cli-wg/pull/105#discussion_r240003491).
We should look into adding an in-depth chapter on how to write applications in a robust and well-behaved way. For example, when an application was forcefully terminated (kill -9, power outage, …), it should still be possible to start it again without any issues.
For this to work, several aspects need to be considered. For example,
- cleaning up or overwriting temporary files from a previous run without issues
- atomically writing config files so they are not corrupted
Other "robustness" aspects that come to mind:
- Follow sane resource limits for the current OS (e.g. not open millions of file descriptors on macOS)
- Try to be both forward and backward compatible with config files and CLI arguments
Noe: As @vorner correctly pointed out, this does not need to be specific to CLI applications!
- Dominant language
- Rust
- Stars
- 1.1k
- Forks
- 122
- Avg merge
- 10h 37m
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rust-cli/book
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
Broken Discord link Open
Difficulty 1/5 Under an hour Newbie friendliness 35/100
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
Difficulty 1/5 Under an hour Newbie friendliness 35/100
-
bug
Difficulty 5/5 Over a week Newbie friendliness 25/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
issue
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
web-infra-dev/rspack#15847 ·