[go: nahoru, domu]

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