OSRB approval is required for third-party crates. To get approval, you will need to follow the instructions under the “Process for 3rd Party Hosted Code” section in this document.
Third-party crates depended on by rustc_binary
and rustc_library
targets are stored in //third-party/rust_crates/vendor
. This set of crates is based on the dependencies listed in //third_party/rust_crates/Cargo.toml
, and is updated by running fx update-rustc-third-party
, which will update the precise versions of the crates used in the Cargo.lock
file and download any necessary crates into the vendor
dir.
If a crate is not available in the vendor directory, it can to be added with the following steps:
third_party/rust_crates/Cargo.toml
.scripts/fx update-rustc-third-party
. This will download all crates listed in rust_crates/Cargo.toml
as well as their dependencies and place them in the vendor
directory.git add
the Cargo.toml
, Cargo.lock
and vendor
directory.