README.md
1# Third Party Rust Crates
2
3TODO: https://pwbug.dev/392963279 - Integrate these docs with the rest of
4 Pigweed's docs
5
6This directory is where third party crate dependencies are managed. There are
7two sets of crates: `./crates_no_std` and `./crates_std`. These are `cargo`
8based "null" Rust libraries that exist solely to express which crates to expose
9to Bazel. `./rust_crates` is a Bazel repository that exposes these crates to
10Bazel.
11
12## Adding a third party crate
13
141. Add the crate to either or both of `./crates_no_std` and `./crates_std`
15 by running `cargo add <crate_name> --features <additional_features>` in the
16 appropriate directory.
172. Update `./rust_crates/aliases.bzl` by running
18 `cargo run -- --config config.toml > rust_crates/aliases.bzl` in this
19 directory.
20