-
Notifications
You must be signed in to change notification settings - Fork 133
/
Copy pathMODULE.bazel
121 lines (112 loc) · 5.43 KB
/
MODULE.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
module(
name = "nativelink",
version = "0.5.4",
compatibility_level = 0,
)
bazel_dep(name = "rules_cc", version = "0.0.17")
bazel_dep(name = "platforms", version = "0.0.11")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_python", version = "1.0.0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
configure_coverage_tool = True,
# TODO(aaronmondal): Fix or remove legacy container pipelines so that they
# run rootless.
ignore_root_user_error = True,
python_version = "3.12",
)
use_repo(python, python = "python_versions")
bazel_dep(name = "rules_rust", version = "0.57.1")
archive_override(
module_name = "rules_rust",
integrity = "sha256-4qOr06EWg6BTBbv9M8xJTfebNkE9VMBXsa17RZD071I=",
patch_strip = 1,
patches = ["//tools:rules_rust-musl-platforms.diff"],
urls = [
"https://github.com/bazelbuild/rules_rust/releases/download/0.57.1/rules_rust-0.57.1.tar.gz",
],
)
crate = use_extension("@rules_rust//crate_universe:extension.bzl", "crate")
crate.from_cargo(
name = "crates",
cargo_lockfile = "//:Cargo.lock",
manifests = [
"//:Cargo.toml",
"//nativelink-config:Cargo.toml",
"//nativelink-error:Cargo.toml",
"//nativelink-macro:Cargo.toml",
"//nativelink-metric:Cargo.toml",
"//nativelink-metric/nativelink-metric-macro-derive:Cargo.toml",
"//nativelink-metric-collector:Cargo.toml",
"//nativelink-proto:Cargo.toml",
"//nativelink-scheduler:Cargo.toml",
"//nativelink-service:Cargo.toml",
"//nativelink-store:Cargo.toml",
"//nativelink-util:Cargo.toml",
"//nativelink-worker:Cargo.toml",
],
supported_platform_triples = [
"aarch64-apple-darwin",
"aarch64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
"arm-unknown-linux-gnueabi",
"armv7-unknown-linux-gnueabi",
"x86_64-apple-darwin",
"x86_64-pc-windows-msvc",
"x86_64-unknown-linux-gnu",
"x86_64-unknown-linux-musl",
],
)
use_repo(crate, "crates")
# NativeLink uses Local Remote Execution for Rust by default which automatically
# handles Rust toolchain configuration via Nix.
#
# If you build outside of Nix you'll have to register these toolchains
# explicitly by passing `--extra_toolchains=@rust_toolchains//:all` to your
# Bazel invocation.
#
# WARNING: This configuration exists entirely as a convenience option and
# migration and is not a supported way of building production
# grade nativelink executables. It may be removed at any point in time.
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
rust.toolchain(
edition = "2021",
# These should always follow the versions from LRE.
rust_analyzer_version = "nightly/2025-01-15",
rustfmt_version = "nightly/2025-01-15",
sha256s = {
"2025-01-15/cargo-nightly-x86_64-unknown-linux-gnu.tar.xz": "f970a04baeee340116fed7e9c64b11b6fa557b339f23c4ef05bac0d2d32966f9",
"2025-01-15/clippy-nightly-x86_64-unknown-linux-gnu.tar.xz": "0ff237a58fe2c060f636cdd22e3be363cb7c242e4118fbffc54b0df3915aa358",
"2025-01-15/llvm-tools-nightly-x86_64-unknown-linux-gnu.tar.xz": "3884a607d4cc75f3e7c9475dc206f864868f17a45c1c1d9b37669119102d3391",
"2025-01-15/rust-std-nightly-x86_64-unknown-linux-gnu.tar.xz": "f477cc00da908f55f122a0dd6efd45c981ae147570bd5d7e5ceca3a2ee1414e1",
"2025-01-15/rustc-nightly-x86_64-unknown-linux-gnu.tar.xz": "690ff845ba85d5a4126f89385e26597fc8ff4d02ab77cc7c7ecc84ccbefe9b5e",
"2025-01-15/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.xz": "692a58a03666823def6e88a8aa8048b5f09276642ffd0f766cd3634e19125928",
"cargo-1.85.0-aarch64-apple-darwin.tar.xz": "d67766fb2e62214b3ee3faf01dcddddcb48e8d0483c2bb3475a16cb96210afed",
"cargo-1.85.0-x86_64-unknown-linux-gnu.tar.xz": "0aff33b57b0e0b102d762a2b53042846c1ca346cff4b7bd96b5c03c9e8e51d81",
"clippy-1.85.0-aarch64-apple-darwin.tar.xz": "62038ee7a541e78ebb34172eac2b8e458e00ecdf4f83bfbe204044c70d9a5e9c",
"clippy-1.85.0-x86_64-unknown-linux-gnu.tar.xz": "0dc3ca1708a6c9eed05d0802364377572b79ff079815b7bcbe8e3991f77c4117",
"llvm-tools-1.85.0-aarch64-apple-darwin.tar.xz": "2652b489590805718981db100a7d4f27611510b3ac46b588a433cb61dcce2402",
"llvm-tools-1.85.0-x86_64-unknown-linux-gnu.tar.xz": "01d5f0f8b3aeb1c7bd4c3ebbf0b30a8be02481f8dfb3fcbf950627460d0d4b5e",
"rust-std-1.85.0-aarch64-apple-darwin.tar.xz": "7da1367209de00e3fb315c0e76658e3605ee2559892d29851a3159ae7ea1ddc5",
"rust-std-1.85.0-x86_64-unknown-linux-gnu.tar.xz": "285e105d25ebdf501341238d4c0594ecdda50ec9078f45095f793a736b1f1ac2",
"rustc-1.85.0-aarch64-apple-darwin.tar.xz": "2a03e227b57a49d80b43473b6fa2d56ad661ece0d8ffd81f639cd31600d3823e",
"rustc-1.85.0-x86_64-unknown-linux-gnu.tar.xz": "7436f13797475082cd87aa65547449e01659d6a810b4cd5f8aedc48bb9f89dfb",
},
versions = [
"1.85.0",
"nightly/2025-01-15",
],
)
use_repo(rust, "rust_toolchains")
bazel_dep(name = "toolchains_protoc", version = "0.3.6")
protoc = use_extension("@toolchains_protoc//protoc:extensions.bzl", "protoc")
protoc.toolchain(
google_protobuf = "com_google_protobuf",
version = "v28.0",
)
# Local remote execution.
bazel_dep(name = "local-remote-execution", version = "0.0.0")
local_path_override(
module_name = "local-remote-execution",
path = "local-remote-execution",
)