This repository was archived by the owner on Mar 10, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathMODULE.bazel
More file actions
91 lines (77 loc) · 3.15 KB
/
MODULE.bazel
File metadata and controls
91 lines (77 loc) · 3.15 KB
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
"""Fixed Execution Order (FEO) framework"""
module(
name = "feo",
version = "0.1",
compatibility_level = 0,
)
# Rust setup
bazel_dep(name = "rules_rust", version = "0.56.0")
RUST_EDITION = "2021"
RUST_VERSION = "1.83.0"
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
rust.toolchain(
edition = RUST_EDITION,
sha256s = {
"rustc-1.83.0-x86_64-unknown-linux-gnu.tar.xz": "6ec40e0405c8cbed3b786a97d374c144b012fc831b7c22b535f8ecb524f495ad",
"clippy-1.83.0-x86_64-unknown-linux-gnu.tar.xz": "ef6c05abcfd861ff0bca41d408e126dda195dc966ee35abee57645a12d418f5b",
"cargo-1.83.0-x86_64-unknown-linux-gnu.tar.xz": "de834a4062d9cd200f8e0cdca894c0b98afe26f1396d80765df828880a39b98c",
"llvm-tools-1.83.0-x86_64-unknown-linux-gnu.tar.xz": "b931673b309c229e234f03271aaa777ea149c3c41f0fb43f3ef13a272540299a",
"rust-std-1.83.0-x86_64-unknown-linux-gnu.tar.xz": "c88fe6cb22f9d2721f26430b6bdd291e562da759e8629e2b4c7eb2c7cad705f2",
},
versions = [RUST_VERSION],
)
use_repo(rust, "rust_toolchains")
crate = use_extension("@rules_rust//crate_universe:extension.bzl", "crate")
crate.from_cargo(
name = "cargo",
cargo_lockfile = "//:Cargo.lock",
manifests = [
"//:Cargo.toml",
"//:examples/rust/cycle-benchmark/Cargo.toml",
"//:examples/rust/mini-adas/Cargo.toml",
"//:feo/Cargo.toml",
"//:feo-com/Cargo.toml",
"//:feo-cpp-build/Cargo.toml",
"//:feo-cpp-macros/Cargo.toml",
"//:feo-log/Cargo.toml",
"//:feo-logger/Cargo.toml",
"//:feo-time/Cargo.toml",
"//:feo-tracer/Cargo.toml",
"//:feo-tracing/Cargo.toml",
"//:logd/Cargo.toml",
"//:perfetto-model/Cargo.toml",
],
)
use_repo(crate, "cargo")
# To update, run `bazel run @rules_rust//tools/rust_analyzer:gen_rust_project`.
rust_analyzer = use_extension("@rules_rust//tools/rust_analyzer:deps.bzl", "rust")
rust_analyzer.rust_analyzer_dependencies()
# C/C++ setup
bazel_dep(name = "googletest", version = "1.15.0")
bazel_dep(name = "rules_cc", version = "0.0.17")
bazel_dep(name = "toolchains_llvm", version = "1.3.0")
# Configure and register the toolchain.
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm")
llvm.toolchain(
llvm_version = "19.1.3",
)
use_repo(llvm, "llvm_toolchain_llvm")
register_toolchains("@llvm_toolchain_llvm//:all")
# Buildifier dependency for formatting and linting bazel files.
bazel_dep(name = "buildifier_prebuilt", version = "6.4.0")
# Generic linting and formatting rules.
bazel_dep(name = "aspect_rules_lint", version = "1.0.0-rc9")
git_override(
module_name = "aspect_rules_lint",
commit = "5cbe85fb43d3c4d20f30e31c88a12ec5eaf06e11",
remote = "https://github.com/dependix/rules_lint.git",
)
# Python dependency to register a toolchain used in other modules.
# We want to run bazel as root in CI and need the `rules_python` in other modules to accept that.
bazel_dep(name = "rules_python", version = "1.1.0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
ignore_root_user_error = True,
is_default = True,
python_version = "3.12",
)