tree: 98d62bbd866a027e1a3d53e1d5698e6f79d74e14 [path history] [tgz]
  1. aho_corasick/
  2. anstyle/
  3. anyhow/
  4. autocfg/
  5. base64/
  6. bitflags/
  7. bytemuck/
  8. bytes/
  9. cc/
  10. cfg_if/
  11. chromium_crates_io/
  12. clap/
  13. clap_builder/
  14. clap_lex/
  15. codespan_reporting/
  16. cxx/
  17. cxxbridge_cmd/
  18. cxxbridge_flags/
  19. cxxbridge_macro/
  20. either/
  21. font_types/
  22. getrandom/
  23. heck/
  24. hex/
  25. hex_literal/
  26. itertools/
  27. itoa/
  28. lazy_static/
  29. libc/
  30. log/
  31. memchr/
  32. memoffset/
  33. nom/
  34. ppv_lite86/
  35. proc_macro2/
  36. prost/
  37. prost_derive/
  38. qr_code/
  39. quote/
  40. rand/
  41. rand_chacha/
  42. rand_core/
  43. rand_pcg/
  44. read_fonts/
  45. regex/
  46. regex_automata/
  47. regex_syntax/
  48. rstest/
  49. rstest_macros/
  50. rstest_reuse/
  51. rustc_demangle/
  52. rustc_demangle_capi/
  53. rustc_version/
  54. rustversion/
  55. ryu/
  56. semver/
  57. serde/
  58. serde_derive/
  59. serde_json/
  60. serde_json_lenient/
  61. skrifa/
  62. small_ctor/
  63. src/
  64. static_assertions/
  65. strsim/
  66. strum/
  67. strum_macros/
  68. syn/
  69. termcolor/
  70. tinyvec/
  71. unicode_ident/
  72. unicode_linebreak/
  73. unicode_width/
  74. winapi/
  75. winapi_util/
  76. wycheproof/
  77. .clang-format
  78. OWNERS
  79. PRESUBMIT.py
  80. README.md
third_party/rust/README.md

Rust third-party code

This directory contains all third-party Rust code, and sometimes thin wrappers around it for C++ intertop.

Crates.io

Crates that come from crates.io are found in //third_party/rust/chromium_crates_io, and are all vendored into the Chromium git repository. They are managed through Cargo rules and with the gnrt tool. See //docs/rust.md for how to bring in new third-party libraries or update them.

The GN rules and README.chromium files for these crates are written by the gnrt tool and should not be edited by hand.

Directory structure

We store GN rules for each third-party crate in a directory of the same name. Under that directory a folder named based on the crate epoch version is created. This limits first-party usage of a crate to only one version within each epoch. If the crate's version has a major version greater-than 0, then that is used as its version folder, such as v1. Otherwise, the name includes all leading zeros in the version, such as v0_3.

For example, GN rules for the tutelage crate at version 1.4.3 would be stored at

//third_party/rust/tutelage/v1

Whereas GN rules for the verion 0.2.8 version would be stored at

//third_party/rust/tutelage/v0_2

Other sources

Third-party Rust libraries that are not distributed through crates.io are uncommon. But they may live under //third_party/rust/crate_name directly, as a git submodule, with GN rules written for them by hand.

OWNERS

We do not require OWNERS in each crate's directory at this time, but this will be revisited in the future.

Review process

Rust libraries must go through the 3rd-party review process. See the review of the toml crate for an example of a Rust security review.