blob: f9938f9df5bb7257242955d8b9253b7b6ea597ac [file] [view]
# lib
Crates in this directory are published to [crates.io](https://crates.io) and obey semver.
They _could_ live in a separate repo, but we want to experiment with a monorepo setup.
We use these crates from crates.io, not the local copies because we want to ensure that
rust-analyzer works with the versions that are published. This means if you add a new API to these
crates, you need to release a new version to crates.io before you can use that API in rust-analyzer.
To release new versions of these packages, change their version in Cargo.toml. Once your PR is merged into master a workflow will automatically publish the new version to crates.io.
While prototyping, the local versions can be used by uncommenting the relevant lines in the
`[patch.'crates-io']` section in Cargo.toml
## Publishing of the crates
The crates are published using [Trusted publishing](https://crates.io/docs/trusted-publishing). If a new lib crate is added
in this directory, it also has to be recorded in the [team database](https://github.com/rust-lang/team/blob/main/repos/rust-lang/rust-analyzer.toml).