This chapter sketches out how to add a new package to the cargo workspace.
Choose the relevant parent directory
credential/
for credential-process related packagesbenches/
for benchmarking of cargo itselfcrates/
for everything elseRun cargo new <name>
<name>
:-
over _
cargo-util-
prefixxtask-
prefixpackage.rust-version
# MSRV:1
comment# MSRV:3
commentIf its an xtask,
.cargo/config.toml
s [alias]
tablepackage.publish = false
If needed to be published with cargo
, add the package to publish.py
in the repo root, in dependency order.
Note: by adding the package to the workspace, you automatically get
cargo test
cargo doc
warningsOur MSRV policies are
We proactively update the MSRV
To proactively update the MSRV, we use RenovateBot with the configuration file in .github/renovatebot.json5
. To know what MSRV policy to use, it looks for comments of the form # MSRV:N
, where N
is the number of supported rust versions.