A tool called
gnrt knows how to download crates and how to generate
To start, download the crate you want like this:
vpython3 tools/crates/run_gnrt.py -- vendor
gnrttool is part of the Chromium source code, by running this command you will be downloading and running its dependencies from
crates.io. See the earlier section discussing this security decision.
vendor command may download:
- Your crate
- Direct and transitive dependencies
- New versions of other crates, as required by
cargoto resolve the complete set of crates required by Chromium.
Chromium maintains patches for some crates, kept in
//third_party/rust/chromium_crates_io/patches. These will be reapplied
automatically, but if patching fails you may need to take manual action.