blob: 0bea20385570790c99b1eb8ce51d9eff0485f2c3 [file] [log] [blame]
Adam Snaider1c095c92023-07-08 02:09:58 -04001load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
2
3BAZEL_ZIG_CC_VERSION = "v0.9.2"
4
5http_archive(
6 name = "bazel-zig-cc",
7 sha256 = "73afa7e1af49e3dbfa1bae9362438cdc51cb177c359a6041a7a403011179d0b5",
8 strip_prefix = "bazel-zig-cc-{}".format(BAZEL_ZIG_CC_VERSION),
9 urls = ["https://git.sr.ht/~motiejus/bazel-zig-cc/archive/{}.tar.gz".format(BAZEL_ZIG_CC_VERSION)],
10)
11
12load("@bazel-zig-cc//toolchain:defs.bzl", zig_toolchains = "toolchains")
13
14zig_toolchains()
15
16register_toolchains(
17 "@zig_sdk//toolchain:linux_arm64_gnu.2.28",
18)
19
20local_repository(
21 name = "rules_rust",
22 path = "../..",
23)
24
25load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains", "rust_repository_set")
26
27rules_rust_dependencies()
28
29load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies")
30
31crate_universe_dependencies(bootstrap = True)
32
33rust_version = "1.70.0"
34
35rust_register_toolchains(
36 edition = "2021",
37 extra_target_triples = [],
38 versions = [rust_version],
39)
40
41rust_repository_set(
42 name = "macos_x86_64",
43 edition = "2021",
44 exec_triple = "x86_64-apple-darwin",
45 extra_target_triples = ["aarch64-unknown-linux-gnu"],
46 versions = [rust_version],
47)
48
49rust_repository_set(
50 name = "linux_x86_64",
51 edition = "2021",
52 exec_triple = "x86_64-unknown-linux-gnu",
53 extra_target_triples = ["aarch64-unknown-linux-gnu"],
54 versions = [rust_version],
55)
56
57load("@rules_rust//crate_universe:defs.bzl", "crate", "crates_repository")
58
59crates_repository(
60 name = "crate_index",
61 cargo_lockfile = "//:Cargo.bazel.lock",
62 # `generator` is not necessary in official releases.
63 # See load satement for `cargo_bazel_bootstrap`.
64 generator = "@cargo_bazel_bootstrap//:cargo-bazel",
65 packages = {
66 "ring": crate.spec(version = "0.16.20"),
67 },
68)
69
70load("@crate_index//:defs.bzl", "crate_repositories")
71
72crate_repositories()
73
74http_archive(
75 name = "aspect_bazel_lib",
76 sha256 = "3534a27621725fbbf1d3e53daa0c1dda055a2732d9031b8c579f917d7347b6c4",
77 strip_prefix = "bazel-lib-1.16.1",
78 url = "https://github.com/aspect-build/bazel-lib/archive/refs/tags/v1.16.1.tar.gz",
79)
80
81load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies")
82
83aspect_bazel_lib_dependencies()