Cargo command to create your README from your crate’s documentation.
Cargo rdme will insert your crate’s documentation in your README file. To control where the
documentation will be inserted you need to insert a marker: <!-- cargo-rdme -->
. For example,
you can start your README with some glorious badges and follow up with the rustdoc
documentation:
```
After running cargo rdme
you will find your README to be something like:
```
Whenever change your crate’s documentation you just need to run cargo rdme
to update your
README file.
Cargo rdme will apply some automatic transformations to your documentation when generating the README file:
#
will be omitted, just like in rustdoc
.If the default behavior of cargo rdme
is not appropriate for your project you can crate a
configuration file .cargo-rdme.toml
in the root of your project. This is how that
configuration file can look like:
```toml
line-terminator = "lf"
src/lib.rs
. You can change that in the entrypoint
table.[entrypoint]
type = "bin"
src/main.rs
. If you have binary targetsbin-name
.bin-name = "my-bin-name" ```
These setting can be overridden with command line flags. Run cargo rdme --help
for more
information.
To verify that your README is up to date with your crate’s documentation you can run
cargo rdme --check
. The exit code will be 0
if the README is up to date, or 2
if it’s
not.