Skip to content

File tree

24 files changed

+675
-6
lines changed

24 files changed

+675
-6
lines changed
+183
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
"""bazelbuild/rules_rust"""
2+
3+
module(
4+
name = "rules_rust",
5+
version = "0.57.1",
6+
)
7+
8+
###############################################################################
9+
## Core
10+
###############################################################################
11+
12+
bazel_dep(
13+
name = "bazel_features",
14+
version = "1.21.0",
15+
)
16+
bazel_dep(
17+
name = "bazel_skylib",
18+
version = "1.7.1",
19+
)
20+
bazel_dep(
21+
name = "platforms",
22+
version = "0.0.11",
23+
)
24+
bazel_dep(
25+
name = "rules_cc",
26+
version = "0.0.17",
27+
)
28+
bazel_dep(
29+
name = "rules_license",
30+
version = "1.0.0",
31+
)
32+
bazel_dep(
33+
name = "rules_shell",
34+
version = "0.3.0",
35+
)
36+
bazel_dep(
37+
name = "apple_support",
38+
version = "1.17.1",
39+
repo_name = "build_bazel_apple_support",
40+
)
41+
42+
internal_deps = use_extension("//rust/private:internal_extensions.bzl", "i")
43+
use_repo(
44+
internal_deps,
45+
"rrra",
46+
"rrra__anyhow-1.0.71",
47+
"rrra__clap-4.3.11",
48+
"rrra__env_logger-0.10.0",
49+
"rrra__itertools-0.11.0",
50+
"rrra__log-0.4.19",
51+
"rrra__serde-1.0.171",
52+
"rrra__serde_json-1.0.102",
53+
"rules_rust_tinyjson",
54+
)
55+
56+
cargo_internal_deps = use_extension("//cargo/private:internal_extensions.bzl", "i")
57+
use_repo(
58+
cargo_internal_deps,
59+
"rrcti",
60+
"rrcti__cargo_toml-0.20.5",
61+
)
62+
63+
rust = use_extension("//rust:extensions.bzl", "rust")
64+
rust.toolchain(edition = "2021")
65+
use_repo(rust, "rust_toolchains")
66+
67+
register_toolchains(
68+
"@rust_toolchains//:all",
69+
)
70+
71+
rust_host_tools = use_extension("//rust:extensions.bzl", "rust_host_tools")
72+
rust_host_tools.host_tools(
73+
name = "rust_host_tools",
74+
)
75+
rust_host_tools.host_tools(
76+
name = "rust_host_tools_nightly",
77+
version = "nightly",
78+
)
79+
use_repo(
80+
rust_host_tools,
81+
"rust_host_tools",
82+
"rust_host_tools_nightly",
83+
)
84+
85+
rust_test = use_extension("//test:test_extensions.bzl", "rust_test", dev_dependency = True)
86+
use_repo(
87+
rust_test,
88+
"buildkite_config",
89+
"generated_inputs_in_external_repo",
90+
"libc",
91+
"rtra",
92+
"rtra__serde-1.0.217",
93+
"rtra__serde_json-1.0.137",
94+
"rules_rust_test_load_arbitrary_tool",
95+
"rules_rust_toolchain_test_target_json",
96+
)
97+
98+
bazel_dep(
99+
name = "rules_python",
100+
version = "0.40.0",
101+
dev_dependency = True,
102+
)
103+
bazel_dep(
104+
name = "rules_testing",
105+
version = "0.7.0",
106+
dev_dependency = True,
107+
)
108+
bazel_dep(
109+
name = "bazel_ci_rules",
110+
version = "1.0.0",
111+
dev_dependency = True,
112+
)
113+
114+
###############################################################################
115+
## Crate Universe
116+
###############################################################################
117+
118+
crate_universe_internal_deps = use_extension(
119+
"//crate_universe/private:internal_extensions.bzl",
120+
"cu",
121+
)
122+
use_repo(
123+
crate_universe_internal_deps,
124+
"cargo_bazel.buildifier-darwin-amd64",
125+
"cargo_bazel.buildifier-darwin-arm64",
126+
"cargo_bazel.buildifier-linux-amd64",
127+
"cargo_bazel.buildifier-linux-arm64",
128+
"cargo_bazel.buildifier-linux-s390x",
129+
"cargo_bazel.buildifier-windows-amd64.exe",
130+
"cui",
131+
"cui__anyhow-1.0.95",
132+
"cui__camino-1.1.9",
133+
"cui__cargo-lock-10.0.1",
134+
"cui__cargo-platform-0.1.9",
135+
"cui__cargo_metadata-0.19.1",
136+
"cui__cargo_toml-0.21.0",
137+
"cui__cfg-expr-0.17.2",
138+
"cui__clap-4.5.26",
139+
"cui__crates-index-3.5.0",
140+
"cui__glob-0.3.2",
141+
"cui__hex-0.4.3",
142+
"cui__indoc-2.0.5",
143+
"cui__itertools-0.14.0",
144+
"cui__maplit-1.0.2",
145+
"cui__normpath-1.3.0",
146+
"cui__once_cell-1.20.2",
147+
"cui__pathdiff-0.2.3",
148+
"cui__regex-1.11.1",
149+
"cui__semver-1.0.24",
150+
"cui__serde-1.0.217",
151+
"cui__serde_json-1.0.135",
152+
"cui__serde_starlark-0.1.16",
153+
"cui__sha2-0.10.8",
154+
"cui__spdx-0.10.8",
155+
"cui__tempfile-3.15.0",
156+
"cui__tera-1.20.0",
157+
"cui__textwrap-0.16.1",
158+
"cui__toml-0.8.19",
159+
"cui__tracing-0.1.41",
160+
"cui__tracing-subscriber-0.3.19",
161+
"cui__url-2.5.4",
162+
"cui__walkdir-2.5.0",
163+
)
164+
165+
crate_universe_internal_non_repro_deps = use_extension(
166+
"//crate_universe/private:internal_extensions.bzl",
167+
"cu_nr",
168+
)
169+
use_repo(
170+
crate_universe_internal_non_repro_deps,
171+
"cargo_bazel_bootstrap",
172+
)
173+
174+
crate_universe_internal_dev_deps = use_extension(
175+
"//crate_universe/private:internal_extensions.bzl",
176+
"cu_dev",
177+
dev_dependency = True,
178+
)
179+
use_repo(
180+
crate_universe_internal_dev_deps,
181+
"cross_rs",
182+
"cross_rs_host_bin",
183+
)
+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
bcr_test_module:
2+
module_path: ""
3+
matrix:
4+
platform: ["macos_arm64", "ubuntu2004"]
5+
bazel: ["7.x"]
6+
tasks:
7+
run_tests:
8+
working_directory: examples/hello_world
9+
name: "Run test module"
10+
platform: ${{ platform }}
11+
bazel: ${{ bazel }}
12+
shell_commands:
13+
# Remove the lockfile because we generate on Bazel 7, but test on Bazel 6 which may not be able to parse a future-generated lockfile.
14+
- "rm MODULE.bazel.lock || true"
15+
run_targets:
16+
- "//third-party-in-workspace:vendor"
17+
- "@rules_rust//tools/rust_analyzer:gen_rust_project"
18+
test_targets:
19+
- "//..."
20+
# Windows is run separately because currently gen_rust_project doesn't run on windows, although it does build
21+
bcr_test_module_windows:
22+
module_path: ""
23+
matrix:
24+
bazel: ["7.x"]
25+
tasks:
26+
run_tests:
27+
working_directory: examples/hello_world
28+
name: "Run test module"
29+
platform: windows
30+
bazel: ${{ bazel }}
31+
shell_commands:
32+
# Remove the lockfile because we generate on Bazel 7, but test on Bazel 6 which may not be able to parse a future-generated lockfile.
33+
- "rm MODULE.bazel.lock || true"
34+
run_targets:
35+
- "//third-party-in-workspace:vendor"
36+
build_targets:
37+
- "@rules_rust//tools/rust_analyzer:gen_rust_project"
38+
test_targets:
39+
- "//..."

modules/rules_rust/0.57.1/source.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"integrity": "sha256-4qOr06EWg6BTBbv9M8xJTfebNkE9VMBXsa17RZD071I=",
3+
"strip_prefix": "",
4+
"url": "https://github.com/bazelbuild/rules_rust/releases/download/0.57.1/rules_rust-0.57.1.tar.gz"
5+
}

modules/rules_rust/metadata.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
"0.54.1",
5050
"0.55.6",
5151
"0.56.0",
52-
"0.57.0"
52+
"0.57.0",
53+
"0.57.1"
5354
],
5455
"yanked_versions": {}
5556
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
"""bazelbuild/rules_rust/extensions/bindgen"""
2+
3+
module(
4+
name = "rules_rust_bindgen",
5+
version = "0.57.1",
6+
)
7+
8+
bazel_dep(
9+
name = "rules_rust",
10+
version = "0.57.1",
11+
)
12+
bazel_dep(
13+
name = "bazel_features",
14+
version = "1.21.0",
15+
)
16+
bazel_dep(
17+
name = "bazel_skylib",
18+
version = "1.7.1",
19+
)
20+
bazel_dep(
21+
name = "platforms",
22+
version = "0.0.10",
23+
)
24+
bazel_dep(
25+
name = "rules_cc",
26+
version = "0.0.17",
27+
)
28+
bazel_dep(
29+
name = "llvm-project",
30+
version = "17.0.3.bcr.1",
31+
)
32+
33+
rust_ext = use_extension("//:extensions.bzl", "rust_ext")
34+
use_repo(
35+
rust_ext,
36+
"rules_rust_bindgen__bindgen-cli-0.70.1",
37+
"rules_rust_bindgen_deps",
38+
"rules_rust_bindgen_deps__bindgen-0.70.1",
39+
"rules_rust_bindgen_deps__clang-sys-1.8.1",
40+
"rules_rust_bindgen_deps__clap-4.5.17",
41+
"rules_rust_bindgen_deps__clap_complete-4.5.26",
42+
"rules_rust_bindgen_deps__env_logger-0.10.2",
43+
)
44+
45+
register_toolchains(
46+
"//:default_bindgen_toolchain",
47+
)
48+
49+
bazel_dep(
50+
name = "rules_testing",
51+
version = "0.7.0",
52+
dev_dependency = True,
53+
)
54+
bazel_dep(
55+
name = "bazel_ci_rules",
56+
version = "1.0.0",
57+
dev_dependency = True,
58+
)
59+
60+
rust_ext_dev = use_extension(
61+
"//private:internal_extensions.bzl",
62+
"rust_ext_dev",
63+
dev_dependency = True,
64+
)
65+
use_repo(
66+
rust_ext_dev,
67+
"buildkite_config",
68+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
bcr_test_module:
2+
module_path: ""
3+
matrix:
4+
platform:
5+
- "macos_arm64"
6+
- "ubuntu2004"
7+
# # TODO: https://github.com/bazelbuild/rules_rust/issues/2009
8+
# - "windows"
9+
bazel: ["7.x"]
10+
tasks:
11+
run_tests:
12+
name: "Run test module"
13+
platform: ${{ platform }}
14+
bazel: ${{ bazel }}
15+
test_targets:
16+
- "//..."
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"integrity": "sha256-4qOr06EWg6BTBbv9M8xJTfebNkE9VMBXsa17RZD071I=",
3+
"strip_prefix": "extensions/bindgen",
4+
"url": "https://github.com/bazelbuild/rules_rust/releases/download/0.57.1/rules_rust-0.57.1.tar.gz"
5+
}

modules/rules_rust_bindgen/metadata.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"versions": [
2424
"0.55.6",
2525
"0.56.0",
26-
"0.57.0"
26+
"0.57.0",
27+
"0.57.1"
2728
],
2829
"yanked_versions": {}
2930
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
"""bazelbuild/rules_rust/extensions/mdbook"""
2+
3+
module(
4+
name = "rules_rust_mdbook",
5+
version = "0.57.1",
6+
)
7+
8+
bazel_dep(
9+
name = "rules_rust",
10+
version = "0.57.1",
11+
)
12+
bazel_dep(
13+
name = "rules_cc",
14+
version = "0.0.17",
15+
)
16+
bazel_dep(
17+
name = "bazel_features",
18+
version = "1.21.0",
19+
)
20+
bazel_dep(
21+
name = "bazel_skylib",
22+
version = "1.7.1",
23+
)
24+
bazel_dep(
25+
name = "platforms",
26+
version = "0.0.10",
27+
)
28+
29+
rust_ext = use_extension("//:extensions.bzl", "rust_ext")
30+
use_repo(
31+
rust_ext,
32+
"rmdbi",
33+
"rmdbi__mdbook-0.4.42",
34+
"rules_rust_mdbook_toolchain",
35+
)
36+
37+
register_toolchains("@rules_rust_mdbook_toolchain//:toolchain")
38+
39+
bazel_dep(
40+
name = "bazel_ci_rules",
41+
version = "1.0.0",
42+
dev_dependency = True,
43+
)
44+
45+
rust_ext_dev = use_extension(
46+
"//private:internal_extensions.bzl",
47+
"rust_ext_dev",
48+
dev_dependency = True,
49+
)
50+
use_repo(
51+
rust_ext_dev,
52+
"buildkite_config",
53+
)

0 commit comments

Comments
 (0)