Skip to content

Commit

Permalink
Updated crate_universe bzlmod to support skipping splicing (bazelbuil…
Browse files Browse the repository at this point in the history
…d#3148)

Additional Changes:
- Updated crate_universe macros to refer to aliases instead of direct
external target for bzlmod support.
- Added `rust_host_tools_nightly` module for exposing a nightly
toolchain
- Converted `examples/crate_universe` to use bzlmod
  • Loading branch information
UebelAndre authored Jan 8, 2025
1 parent 1d0fe8a commit 5e90483
Show file tree
Hide file tree
Showing 459 changed files with 6,181 additions and 4,468 deletions.
6 changes: 6 additions & 0 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -429,9 +429,15 @@ tasks:
- sed -i 's/^# rbe_preconfig/rbe_preconfig/' WORKSPACE.bazel
run_targets: *crate_universe_vendor_example_targets
build_targets:
- "--"
- "//..."
# TODO: Fix boringssl on RBE
- "-//complicated_dependencies/..."
test_targets:
- "--"
- "//..."
# TODO: Fix boringssl on RBE
- "-//complicated_dependencies/..."
build_flags: *aspects_flags
crate_universe_examples_macos:
name: Crate Universe Examples
Expand Down
18 changes: 15 additions & 3 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ bazel_dep(
internal_deps = use_extension("//rust/private:internal_extensions.bzl", "i")
use_repo(
internal_deps,
"rrra",
"rrra__anyhow-1.0.71",
"rrra__clap-4.3.11",
"rrra__env_logger-0.10.0",
Expand All @@ -61,7 +62,18 @@ register_toolchains(
)

rust_host_tools = use_extension("//rust:extensions.bzl", "rust_host_tools")
use_repo(rust_host_tools, "rust_host_tools")
rust_host_tools.host_tools(
name = "rust_host_tools",
)
rust_host_tools.host_tools(
name = "rust_host_tools_nightly",
version = "nightly",
)
use_repo(
rust_host_tools,
"rust_host_tools",
"rust_host_tools_nightly",
)

rust_test = use_extension("//test:test_extensions.bzl", "rust_test", dev_dependency = True)
use_repo(
Expand All @@ -70,8 +82,8 @@ use_repo(
"generated_inputs_in_external_repo",
"libc",
"rtra",
"rtra__serde-1.0.216",
"rtra__serde_json-1.0.133",
"rtra__serde-1.0.217",
"rtra__serde_json-1.0.134",
"rules_rust_test_load_arbitrary_tool",
"rules_rust_toolchain_test_target_json",
)
Expand Down
Loading

0 comments on commit 5e90483

Please sign in to comment.