commit | de54de1a2683212d8edb4e15ec7393eb013c849c | [log] [tgz] |
---|---|---|
author | Erik Gilling <konkers@google.com> | Tue Mar 05 21:19:26 2024 +0000 |
committer | Erik Gilling <konkers@google.com> | Tue Mar 05 21:19:26 2024 +0000 |
tree | 679e2deec5f60affb0166e259c7a0bd98995aac6 | |
parent | 6d975531f7672cc6aa54bdd7517e1beeffa578da [diff] |
Add libc and nix crates Brings in bitflags and cfg_aliases crates as transitive deps. Change-Id: Ib141c2a0a71082901abc9f4c26ee9fd94682f2d0 Reviewed-on: https://pigweed-review.googlesource.com/c/third_party/rust_crates/+/194937 Reviewed-by: Taylor Cramer <cramertj@google.com>
This is a repository to vendor and provide build rules for the third party crates that Pigweed's rust code depends on. Currently only Bazel build rules are provided.
std
and no_std
This repository provides two separate sets of crates. One for std
environments and one for no_std
environments. The set that is used is determined by the //:std_enabled
constraint setting and defaults to std
. To use no_std
add @rust_crates//:no_std
to your platform definition.
The list of vendored crates is defined by the dependencies listed in //crates/Cargo.toml and //crates_std/Cargo.toml. The contents of the //crates
and //crates_std
directories are generated by the //:crates_vendor
and //:crates_vendor_std
targets.
To update the vendored crates, build files, and aliases to match run the following commands from the top level directory of the repository:
bazel run //:crates_vendor -- --repin bazel run //:crates_vendor_std -- --repin cargo run -- --config config.toml > aliases.bzl
Licenses can be checked with cargo license -d
in the appropriate stub_crate.
We keep this, and all Markdown files in this repository, in a consistent Markdown format using mdformat. To install and format, use the following commands:
pip install mdformat-gfm mdformat README.md
= note: collect2: fatal error: cannot find 'ld' compilation terminated.
If you get the above error when running bazel run //:crates_vendor -- --repin
, ensure lld
is installed on your system. For instance, on Debian based systems:
sudo apt install lld