| local_repository( |
| name = "rules_rust", |
| path = "../..", |
| ) |
| |
| load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains", "rust_repository_set") |
| |
| rules_rust_dependencies() |
| |
| EDITION = "2021" |
| |
| RUST_VERSION = "1.76.0" |
| |
| rust_register_toolchains( |
| edition = EDITION, |
| ) |
| |
| rust_repository_set( |
| name = "darwin_x86_64_to_x86_64_musl_tuple", |
| edition = EDITION, |
| exec_triple = "x86_64-apple-darwin", |
| # Setting this extra_target_triples allows differentiating the musl case from the non-musl case, in case multiple linux-targeting toolchains are registered. |
| extra_target_triples = {"x86_64-unknown-linux-musl": [ |
| "@//linker_config:musl", |
| "@platforms//cpu:x86_64", |
| "@platforms//os:linux", |
| ]}, |
| versions = [RUST_VERSION], |
| ) |
| |
| rust_repository_set( |
| name = "darwin_arm64_to_x86_64_musl_tuple", |
| edition = EDITION, |
| exec_triple = "aarch64-apple-darwin", |
| extra_target_triples = {"x86_64-unknown-linux-musl": [ |
| "@//linker_config:musl", |
| "@platforms//cpu:x86_64", |
| "@platforms//os:linux", |
| ]}, |
| versions = [RUST_VERSION], |
| ) |
| |
| rust_repository_set( |
| name = "darwin_x86_64_to_arm64_musl_tuple", |
| edition = EDITION, |
| exec_triple = "x86_64-apple-darwin", |
| # Setting this extra_target_triples allows differentiating the musl case from the non-musl case, in case multiple linux-targeting toolchains are registered. |
| extra_target_triples = {"aarch64-unknown-linux-musl": [ |
| "@//linker_config:musl", |
| "@platforms//cpu:arm64", |
| "@platforms//os:linux", |
| ]}, |
| versions = [RUST_VERSION], |
| ) |
| |
| rust_repository_set( |
| name = "darwin_arm64_to_arm64_musl_tuple", |
| edition = EDITION, |
| exec_triple = "aarch64-apple-darwin", |
| extra_target_triples = {"aarch64-unknown-linux-musl": [ |
| "@//linker_config:musl", |
| "@platforms//cpu:arm64", |
| "@platforms//os:linux", |
| ]}, |
| versions = [RUST_VERSION], |
| ) |
| |
| load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| |
| http_archive( |
| name = "aspect_bazel_lib", |
| sha256 = "f5ea76682b209cc0bd90d0f5a3b26d2f7a6a2885f0c5f615e72913f4805dbb0d", |
| strip_prefix = "bazel-lib-2.5.0", |
| url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.5.0/bazel-lib-v2.5.0.tar.gz", |
| ) |
| |
| load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies", "aspect_bazel_lib_register_toolchains") |
| |
| aspect_bazel_lib_dependencies() |
| |
| aspect_bazel_lib_register_toolchains() |
| |
| http_archive( |
| name = "musl_toolchains", |
| sha256 = "f9f077b9ae74a0545f7cb7108462cb061593eef10fd09d25db4554e281ee880b", |
| url = "https://github.com/bazel-contrib/musl-toolchain/releases/download/v0.1.7/musl_toolchain-v0.1.7.tar.gz", |
| ) |
| |
| load("@musl_toolchains//:repositories.bzl", "load_musl_toolchains") |
| |
| # Setting this extra_target_triples allows differentiating the musl case from the non-musl case, in case multiple linux-targeting toolchains are registered. |
| load_musl_toolchains(extra_target_compatible_with = ["@//linker_config:musl"]) |
| |
| load("@musl_toolchains//:toolchains.bzl", "register_musl_toolchains") |
| |
| register_musl_toolchains() |