-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMODULE.bazel
80 lines (68 loc) · 1.99 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
"""squid - trends detector"""
module(
name = "squid",
version = "1.0",
)
# Protobuf support.
bazel_dep(name = "rules_proto", version = "6.0.2")
bazel_dep(
name = "protobuf",
version = "23.1",
repo_name = "com_google_protobuf",
)
proto = use_extension("@rules_proto//proto:repositories.bzl", "proto")
proto.dependencies()
proto.toolchain()
# Rust support.
bazel_dep(name = "rules_rust", version = "0.49.3")
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
rust.toolchain(edition = "2021")
use_repo(
rust,
"rust_toolchains",
)
register_toolchains("@rust_toolchains//:all")
crate = use_extension(
"@rules_rust//crate_universe:extension.bzl",
"crate",
)
crate.from_cargo(
name = "crate_index",
cargo_lockfile = "//:Cargo.lock",
manifests = [
"//:Cargo.toml",
"//benchmarks:Cargo.toml",
"//squid:Cargo.toml",
"//squid-algorithm:Cargo.toml",
"//squid-db:Cargo.toml",
"//squid-error:Cargo.toml",
"//squid-tokenizer:Cargo.toml",
],
)
use_repo(crate, "crate_index")
# OCI support.
bazel_dep(name = "rules_pkg", version = "1.0.1")
bazel_dep(name = "rules_oci", version = "1.8.0")
bazel_dep(name = "aspect_bazel_lib", version = "2.7.9")
git_override(
module_name = "rules_oci",
commit = "e060819b2b19dd827f255900068e134b4914ff63",
remote = "https://github.com/archen/rules_oci",
)
ext = use_extension("@aspect_bazel_lib//lib:extensions.bzl", "toolchains")
use_repo(ext, "yq_toolchains") # For checksum verification
oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")
oci.toolchains(
name = "oci",
crane_version = "v0.15.2",
)
oci.pull(
name = "distroless_cc",
digest = "sha256:a9056d2232d16e3772bec3ef36b93a5ea9ef6ad4b4ed407631e534b85832cf40",
image = "gcr.io/distroless/cc-debian12",
platforms = [
"linux/amd64",
"linux/arm64/v8",
],
)
use_repo(oci, "distroless_cc")