tree: 096a851eefb8da7889d8a5c2798c63a165ee5abc [path history] [tgz]
  1. crates_no_std/
  2. crates_std/
  3. rust_crates/
  4. src/
  5. .gitignore
  6. Cargo.toml
  7. config.toml
  8. README.md
build/crates_io/README.md

Third Party Rust Crates

This directory is where third party crate dependencies are managed. There are two sets of crates: ./crates_no_std and ./crates_std. These are cargo based “null” Rust libraries that exist solely to express which crates to expose to Bazel. ./rust_crates is a Bazel repository that exposes these crates to Bazel.

Adding a third party crate

  1. Add the crate to either or both of ./crates_no_std and ./crates_std by running cargo add <crate_name> --features <additional_features> in the appropriate directory.
  2. Update ./rust_crates/aliases.bzl by running cargo run -- --config config.toml > rust_crates/aliases.bzl in this directory.