I was searching for the recommended order of fields in the [package]
section to make Carg.toml a bit more unified in crates developed by me.
The list in the cargo book looks like a good option, but the Cargo.toml conventions state the following:
Put the
[package]
section at the top of the file; put thename
andversion
keys in that order at the top of that section, followed by the remaining keys other thandescription
in order, followed by thedescription
at the end of that section.
So the recommendation is to put description
to the very end of the [package]
section. But I haven't seen many crates which follow it in practice. Some of the rust-lang crates follow it (e.g. flate2
, libc
, etc.), some don't (e.g. log
, cc
, std_detect
, etc.). In my experience, it is even less frequent in the wider ecosystem.
Do you agree with the description
recommendation? What are your thoughts on the recommended order of fields? Maybe the conventions page should cover all other field in addition to the 3 mentioned?