tree: 25d9101cf171d69f4c6db8db93217731e9018b3b [path history] [tgz]
  1. aho_corasick/
  2. atty/
  3. autocfg/
  4. bindgen/
  5. bitflags/
  6. camino/
  7. cargo_metadata/
  8. cargo_platform/
  9. cc/
  10. cexpr/
  11. cfg_if/
  12. clang_sys/
  13. clap/
  14. clap_lex/
  15. codespan_reporting/
  16. cxx/
  17. cxxbridge_cmd/
  18. cxxbridge_macro/
  19. either/
  20. env_logger/
  21. fastrand/
  22. glob/
  23. hashbrown/
  24. humantime/
  25. indexmap/
  26. itoa/
  27. lazy_static/
  28. lazycell/
  29. libc/
  30. libloading/
  31. link_cplusplus/
  32. log/
  33. memchr/
  34. memoffset/
  35. minimal_lexical/
  36. nom/
  37. once_cell/
  38. os_str_bytes/
  39. peeking_take_while/
  40. proc_macro2/
  41. quote/
  42. regex/
  43. regex_syntax/
  44. remove_dir_all/
  45. rstest/
  46. rustc_hash/
  47. rustc_version/
  48. rustversion/
  49. ryu/
  50. semver/
  51. serde/
  52. serde_derive/
  53. serde_json/
  54. serde_json_lenient/
  55. shlex/
  56. small_ctor/
  57. src/
  58. static_assertions/
  59. strsim/
  60. syn/
  61. tempfile/
  62. termcolor/
  63. textwrap/
  64. toml/
  65. unicode_ident/
  66. unicode_linebreak/
  67. unicode_width/
  68. version_check/
  69. which/
  70. winapi/
  71. winapi_util/
  72. .clang-format
  73. .gitignore
  74. Cargo.lock
  75. Cargo.toml
  76. crates_py_build_patch
  77. gnrt_build_patch
  78. OWNERS
  79. README.md
  80. third_party.toml
third_party/rust/README.md

Rust third-party code

Use of Rust is being experimented with. As such, code outside of that experiment should not depend on targets in this directory.

Directory structure

We store 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. 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 or v0_0_6.

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

//third_party/rust/tutelage/v1

Whereas the verion 0.2.8 version would be stored at

//third_party/rust/tutelage/v0_2

OWNERS

We do not require OWNERS in each crate's directory at this time, however this will be revisted when Rust goes to production.

Vendoring vs DEPS

In order to move quickly and reduce our processes, we will vendor third-party code directly into Chromium src.git under this directory.

Testing

All third-party crates should have their tests added to a Chromium test suite. These tests will be run on the Rust FYI bots, and may move to a blocking bot when Rust goes to production.

Tooling

Contents of the third_party/rust directory are managed using the tools under tools/crates. Manual edits should not be needed, except to configure and guide the tools (e.g. via third_party.toml).

Review process

At this time adding new 3rd party crates requires a review by:

  • //build/rust/OWNERS- i.e. a Chrome ATL review is not needed while broader Rust usage is not allowed / while Rust usage remains an experiment.
  • security@chromium.org (or chrome-security@google.com, Google-only)
    • Earlier examples of audits/documents/emails that are good role models of the review process: toml crate (e.g. see here)
    • Bug tracking having a more centralized database of crate review status (i.e. leveraging reviews already done by other teams): TODO.