No description
Find a file
Ed Page d43f1dbf6f docs: Move everything to docs.rs
A couple of things happened when preparing to release 3.0
- We needed derive documentation
  - I had liked how serde handled theres
  - I had bad experiences finding things in structopt's documentation
- The examples were broken and we needed tests
- The examples seemed to follow a pattern of having tutorial content and
  cookbook content
- We had been getting bug reports from people looking at master and
  thinking they were looking at what is currently released
- We had gotten feedback to keep down the number of places that
  documentation was located

From this, we went with a mix of docs.rs and github
- We kept the number of content locations at 2 rather than 3 by not
  having an external site like serde
- We rewrote the examples into explicit tutorials and cookbooks to align
  with the 4 styles of documentation
- We could test our examples by running `console` code blocks with
  trycmd
- Documentation was versioned and the README pointed to the last release

This had downsides
- The tutorials didn't have the code inlined
- Users still had a hard time finding and navigating between the
  different forms of documentation
- In practice, we were less likely to cross-link between the different
  types of documentation

Moving to docs.rs would offer a lot of benefits, even if it is only
designed for Rust-reference documentation and isn't good for Rust derive
reference documentation, tutorials, cookbooks, etc.  The big problem was
keeping the examples tested to keep maintenance costs down.  Maybe its
just me but its easy to overlook
- You can pull documentation from a file using `#[doc = "path"]`
- Repeated doc attributes get concatenated rather than first or last
  writer winning

Remember these when specifically thinking about Rust documentation made
me realize that we could get everything into docs.rs.

When doing this
- Tutorial code got brought in as was one of the aims
- We needed to split the lib documentation and the README to have all of
  the linking work.  This allowed us to specialize them according to
  their rule (user vs contributor)
- We needed to avoid users getting caught up in making a decision
  between Derive and Builder APIs so we put the focus on the derive API
  with links to the FAQ to help users decide when to use one or the
  other.
- Improved cross-referencing between different parts of the
  documentation
- Limited inline comments were added to example code
  - Introductory example code intentionally does not have teaching
    comments in it as its meant to give a flavor or sense of things and
    not meant to teach on its own.

This is a first attempt.  There will be a lot of room for further
improvement.  Current know downsides:
- Content source is more split up for the tutorials

This hopefully addresses #3189
2022-07-19 13:30:38 -05:00
.github chore(deps): bump pre-commit/action from 2.0.3 to 3.0.0 2022-07-01 03:05:59 +00:00
assets docs: Add back in logo 2021-12-07 17:45:57 -06:00
clap_bench chore: Bump MSRV from 1.56.0 to 1.56.1 2022-06-17 09:01:45 -05:00
clap_complete docs(complete): Make example consistent 2022-07-11 15:20:45 -05:00
clap_complete_fig chore: Release 2022-07-01 19:48:03 -05:00
clap_derive chore: Release 2022-06-28 08:04:18 -05:00
clap_lex chore: Release 2022-06-28 08:04:18 -05:00
clap_mangen chore: Release 2022-06-28 08:04:18 -05:00
examples docs: Move everything to docs.rs 2022-07-19 13:30:38 -05:00
src docs: Move everything to docs.rs 2022-07-19 13:30:38 -05:00
tests Merge pull request #3902 from tmccombs/get-conflicts-with-group 2022-07-14 09:37:45 -05:00
.clippy.toml chore: Bump MSRV from 1.56.0 to 1.56.1 2022-06-17 09:01:45 -05:00
.gitignore chore: Allow testing MSRV 2022-07-19 13:50:27 -05:00
.pre-commit-config.yaml chore: Upgrade boilerplate 2022-02-15 12:36:19 -06:00
Cargo.lock chore: Allow testing MSRV 2022-07-19 13:50:27 -05:00
Cargo.toml chore: Release 2022-07-14 09:38:54 -05:00
CHANGELOG.md chore: Release 2022-07-14 09:38:54 -05:00
clap.schema.json feat(doc): Fix many typos in docs, comments and codes found by typos-cli 2021-10-19 10:38:22 +09:00
committed.toml chore: Align on boilerplate 2021-11-17 15:24:50 -06:00
CONTRIBUTING.md fix: Allow people to opt-in to deprecations 2022-06-14 10:50:05 -05:00
LICENSE-APACHE chore: relicense under MIT and APACHE 2.0 2018-07-23 14:25:18 -04:00
LICENSE-MIT docs(license): Update years/holders 2022-06-27 12:55:09 -05:00
Makefile chore: Bump MSRV from 1.56.0 to 1.56.1 2022-06-17 09:01:45 -05:00
README.md docs: Move everything to docs.rs 2022-07-19 13:30:38 -05:00
release.toml chore: Configure release process 2021-12-07 21:36:00 -06:00
typos.toml docs: Fix typos 2021-11-17 15:21:58 -06:00

clap

Command Line Argument Parser for Rust

Crates.io Crates.io License License Build Status Coverage Status Contributors

Dual-licensed under Apache 2.0 or MIT.

About

Create your command-line parser, with all of the bells and whistles, declaratively or procedurally.

For more details, see:

Sponsors

Gold

Silver

Bronze

Backer