fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
285c36a6
patching
files
| env/ | |
| rust/hello_world/ | |
| .bazelignore | 7 B |
| .bazelrc | 519 B |
| .envrc | 321 B |
| .gitignore | 9 B |
| BUILD.bazel | 1.1 KiB |
| Cargo.lock | 155 B |
| Cargo.toml | 63 B |
| MODULE.bazel | 902 B |
| README.md | 479 B |
| WORKSPACE.bazel | 36 B |
| WORKSPACE.bzlmod | 53 B |
| cargo_test.sh | 1.2 KiB |
| hello | 386.8 KiB |
| rustc_test.sh | 1.1 KiB |
| rustfmt_test.sh | 1.2 KiB |
rules_rust with bazel_env
This example uses bazel_env.bzl to
provide cargo, cargo-clippy, rustc and rustfmt from the bazel toolchains
to the user. They will be available directly in the PATH when the user
enters this directory and has direnv set up.
Advantages:
- The user doesn't have to install the toolchains themselves.
- The tool versions will always match exactly those that bazel uses.