You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow crate_universe to use external rust_host_tools (#3418)
This allows users of `rules_rust` to define their own `rust_host_tools`
modules and use it with `crate_universe` to control the versions of
rustc and cargo used by it.
For example:
```python
rust_host_tools = use_extension("@rules_rust//rust:extensions.bzl", "rust_host_tools")
rust_host_tools.host_tools(
name = "my_rust_host_tools",
version = "1.86.0",
)
use_repo(
rust_host_tools,
"my_rust_host_tools",
)
crate = use_extension("@rules_rust//crate_universe:extensions.bzl", "crate")
crate.from_cargo(
name = "crate_index",
manifests = ["//:Cargo.toml"],
cargo_lockfile = "//:Cargo.lock",
lockfile = "//:cargo-bazel-lock.json",
host_tools = "@my_rust_host_tools",
)
use_repo(
crate,
"crate_index",
)
```
0 commit comments