Book: Chapter on "writing robust CLI applications"
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.1k
- Forks
- 122
- Avg merge
- 10h 37m
- Merged PRs (30d)
- 2
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!
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.
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.
Assessment
- Tech stack
- rust
- Domain
- cli, documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100