Adam Snaider | 1c095c9 | 2023-07-08 02:09:58 -0400 | [diff] [blame^] | 1 | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| 2 | |
| 3 | BAZEL_ZIG_CC_VERSION = "v0.9.2" |
| 4 | |
| 5 | http_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 | |
| 12 | load("@bazel-zig-cc//toolchain:defs.bzl", zig_toolchains = "toolchains") |
| 13 | |
| 14 | zig_toolchains() |
| 15 | |
| 16 | register_toolchains( |
| 17 | "@zig_sdk//toolchain:linux_arm64_gnu.2.28", |
| 18 | ) |
| 19 | |
| 20 | local_repository( |
| 21 | name = "rules_rust", |
| 22 | path = "../..", |
| 23 | ) |
| 24 | |
| 25 | load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains", "rust_repository_set") |
| 26 | |
| 27 | rules_rust_dependencies() |
| 28 | |
| 29 | load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies") |
| 30 | |
| 31 | crate_universe_dependencies(bootstrap = True) |
| 32 | |
| 33 | rust_version = "1.70.0" |
| 34 | |
| 35 | rust_register_toolchains( |
| 36 | edition = "2021", |
| 37 | extra_target_triples = [], |
| 38 | versions = [rust_version], |
| 39 | ) |
| 40 | |
| 41 | rust_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 | |
| 49 | rust_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 | |
| 57 | load("@rules_rust//crate_universe:defs.bzl", "crate", "crates_repository") |
| 58 | |
| 59 | crates_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 | |
| 70 | load("@crate_index//:defs.bzl", "crate_repositories") |
| 71 | |
| 72 | crate_repositories() |
| 73 | |
| 74 | http_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 | |
| 81 | load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies") |
| 82 | |
| 83 | aspect_bazel_lib_dependencies() |