xref: /aosp_15_r20/external/bazelbuild-rules_rust/examples/bazel_env/README.md (revision d4726bddaa87cc4778e7472feed243fa4b6c267f)
1*d4726bddSHONG Yifan# rules_rust with bazel_env
2*d4726bddSHONG Yifan
3*d4726bddSHONG YifanThis example uses [bazel_env.bzl](https://github.com/buildbuddy-io/bazel_env.bzl) to
4*d4726bddSHONG Yifanprovide `cargo`, `cargo-clippy`, `rustc` and `rustfmt` from the bazel toolchains
5*d4726bddSHONG Yifanto the user. They will be available directly in the PATH when the user
6*d4726bddSHONG Yifanenters this directory and has [direnv](https://direnv.net/) set up.
7*d4726bddSHONG Yifan
8*d4726bddSHONG YifanAdvantages:
9*d4726bddSHONG Yifan
10*d4726bddSHONG Yifan- The user doesn't have to install the toolchains themselves.
11*d4726bddSHONG Yifan- The tool versions will always match exactly those that bazel uses.
12