fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
d5289ad1
rust-analyzer
1load ( "@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" ) 2 3BAZEL_ZIG_CC_VERSION = "v0.9.2" 4 5http_archive ( 6name = "bazel-zig-cc" , 7sha256 = "73afa7e1af49e3dbfa1bae9362438cdc51cb177c359a6041a7a403011179d0b5" , 8strip_prefix = "bazel-zig-cc-{}" . format ( BAZEL_ZIG_CC_VERSION ), 9urls = [ "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 ( 21name = "rules_rust" , 22path = "../.." , 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.65.0" 34 35rust_register_toolchains ( 36edition = "2021" , 37extra_target_triples = [], 38versions = [ rust_version ], 39) 40 41rust_repository_set ( 42name = "macos_x86_64" , 43edition = "2021" , 44exec_triple = "x86_64-apple-darwin" , 45extra_target_triples = [ "aarch64-unknown-linux-gnu" ], 46versions = [ rust_version ], 47) 48 49rust_repository_set ( 50name = "linux_x86_64" , 51edition = "2021" , 52exec_triple = "x86_64-unknown-linux-gnu" , 53extra_target_triples = [ "aarch64-unknown-linux-gnu" ], 54versions = [ rust_version ], 55) 56 57load ( "@rules_rust//crate_universe:defs.bzl" , "crate" , "crates_repository" ) 58 59crates_repository ( 60name = "crate_index" , 61cargo_lockfile = "//:Cargo.bazel.lock" , 62# `generator` is not necessary in official releases. 63# See load satement for `cargo_bazel_bootstrap`. 64generator = "@cargo_bazel_bootstrap//:cargo-bazel" , 65packages = { 66"ring" : crate . spec ( version = "0.16.20" ), 67}, 68) 69 70load ( "@crate_index//:defs.bzl" , "crate_repositories" ) 71 72crate_repositories () 73 74http_archive ( 75name = "aspect_bazel_lib" , 76sha256 = "3534a27621725fbbf1d3e53daa0c1dda055a2732d9031b8c579f917d7347b6c4" , 77strip_prefix = "bazel-lib-1.16.1" , 78url = "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 ()