fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
e61e6e12
cleanup
1workspace ( name = "examples" ) 2 3local_repository ( 4name = "rules_rust" , 5path = "../../" , 6) 7 8load ( "@rules_rust//rust:repositories.bzl" , "rules_rust_dependencies" , "rust_register_toolchains" ) 9 10rules_rust_dependencies () 11 12rust_register_toolchains ( 13edition = "2018" , 14) 15 16load ( "@rules_rust//crate_universe:repositories.bzl" , "crate_universe_dependencies" ) 17 18crate_universe_dependencies ( bootstrap = True ) 19 20load ( "@rules_rust//crate_universe:defs.bzl" , "crate" , "crates_repository" , "render_config" , "splicing_config" ) 21 22############################################################################### 23# A L I A S R U L E 24############################################################################### 25 26crates_repository ( 27name = "alias_rule_global_alias_annotation_none" , 28annotations = { 29"test_data_passing_crate" : [ crate . annotation ( 30alias_rule = None , 31)], 32}, 33cargo_lockfile = "//alias_rule:Cargo.Bazel.lock" , 34# `generator` is not necessary in official releases. 35# See load satement for `cargo_bazel_bootstrap`. 36generator = "@cargo_bazel_bootstrap//:cargo-bazel" , 37lockfile = "//alias_rule:cargo-bazel-lock_global_alias_annotation_none.json" , 38packages = { 39"test_data_passing_crate" : crate . spec ( 40version = "0.1.0" , 41), 42}, 43render_config = render_config ( 44default_alias_rule = "alias" , 45), 46) 47 48load ( 49"@alias_rule_global_alias_annotation_none//:defs.bzl" , 50alias_rule_global_alias_annotation_none_crate_repositories = "crate_repositories" , 51) 52 53alias_rule_global_alias_annotation_none_crate_repositories () 54 55crates_repository ( 56name = "alias_rule_global_alias_annotation_opt" , 57annotations = { 58"test_data_passing_crate" : [ crate . annotation ( 59alias_rule = "opt" , 60)], 61}, 62cargo_lockfile = "//alias_rule:Cargo.Bazel.lock" , 63# `generator` is not necessary in official releases. 64# See load satement for `cargo_bazel_bootstrap`. 65generator = "@cargo_bazel_bootstrap//:cargo-bazel" , 66lockfile = "//alias_rule:cargo-bazel-lock_global_alias_annotation_opt.json" , 67packages = { 68"test_data_passing_crate" : crate . spec ( 69version = "0.1.0" , 70), 71}, 72render_config = render_config ( 73default_alias_rule = "alias" , 74), 75) 76 77load ( 78"@alias_rule_global_alias_annotation_opt//:defs.bzl" , 79alias_rule_global_alias_annotation_opt_crate_repositories = "crate_repositories" , 80) 81 82alias_rule_global_alias_annotation_opt_crate_repositories () 83 84crates_repository ( 85name = "alias_rule_global_opt_annotation_none" , 86annotations = { 87"test_data_passing_crate" : [ crate . annotation ( 88alias_rule = None , 89)], 90}, 91cargo_lockfile = "//alias_rule:Cargo.Bazel.lock" , 92# `generator` is not necessary in official releases. 93# See load satement for `cargo_bazel_bootstrap`. 94generator = "@cargo_bazel_bootstrap//:cargo-bazel" , 95lockfile = "//alias_rule:cargo-bazel-lock_global_opt_annotation_none.json" , 96packages = { 97"test_data_passing_crate" : crate . spec ( 98version = "0.1.0" , 99), 100}, 101render_config = render_config ( 102default_alias_rule = "opt" , 103), 104) 105 106load ( 107"@alias_rule_global_opt_annotation_none//:defs.bzl" , 108alias_rule_global_opt_annotation_none_crate_repositories = "crate_repositories" , 109) 110 111alias_rule_global_opt_annotation_none_crate_repositories () 112 113crates_repository ( 114name = "alias_rule_global_opt_annotation_alias" , 115annotations = { 116"test_data_passing_crate" : [ crate . annotation ( 117alias_rule = "alias" , 118)], 119}, 120cargo_lockfile = "//alias_rule:Cargo.Bazel.lock" , 121# `generator` is not necessary in official releases. 122# See load satement for `cargo_bazel_bootstrap`. 123generator = "@cargo_bazel_bootstrap//:cargo-bazel" , 124lockfile = "//alias_rule:cargo-bazel-lock_global_opt_annotation_alias.json" , 125packages = { 126"test_data_passing_crate" : crate . spec ( 127version = "0.1.0" , 128), 129}, 130render_config = render_config ( 131default_alias_rule = "opt" , 132), 133) 134 135load ( 136"@alias_rule_global_opt_annotation_alias//:defs.bzl" , 137alias_rule_global_opt_annotation_alias_crate_repositories = "crate_repositories" , 138) 139 140alias_rule_global_opt_annotation_alias_crate_repositories () 141 142crates_repository ( 143name = "alias_rule_global_opt_annotation_dbg" , 144annotations = { 145"test_data_passing_crate" : [ crate . annotation ( 146alias_rule = "dbg" , 147)], 148}, 149cargo_lockfile = "//alias_rule:Cargo.Bazel.lock" , 150# `generator` is not necessary in official releases. 151# See load satement for `cargo_bazel_bootstrap`. 152generator = "@cargo_bazel_bootstrap//:cargo-bazel" , 153lockfile = "//alias_rule:cargo-bazel-lock_global_opt_annotation_dbg.json" , 154packages = { 155"test_data_passing_crate" : crate . spec ( 156version = "0.1.0" , 157), 158}, 159render_config = render_config ( 160default_alias_rule = "opt" , 161), 162) 163 164load ( 165"@alias_rule_global_opt_annotation_dbg//:defs.bzl" , 166alias_rule_global_opt_annotation_dbg_crate_repositories = "crate_repositories" , 167) 168 169alias_rule_global_opt_annotation_dbg_crate_repositories () 170 171crates_repository ( 172name = "alias_rule_global_dbg_annotation_fastbuild" , 173annotations = { 174"test_data_passing_crate" : [ crate . annotation ( 175alias_rule = "fastbuild" , 176)], 177}, 178cargo_lockfile = "//alias_rule:Cargo.Bazel.lock" , 179# `generator` is not necessary in official releases. 180# See load satement for `cargo_bazel_bootstrap`. 181generator = "@cargo_bazel_bootstrap//:cargo-bazel" , 182lockfile = "//alias_rule:cargo-bazel-lock_global_dbg_annotation_fastbuild.json" , 183packages = { 184"test_data_passing_crate" : crate . spec ( 185version = "0.1.0" , 186), 187}, 188render_config = render_config ( 189default_alias_rule = "dbg" , 190), 191) 192 193load ( 194"@alias_rule_global_dbg_annotation_fastbuild//:defs.bzl" , 195alias_rule_global_dbg_annotation_fastbuild_crate_repositories = "crate_repositories" , 196) 197 198alias_rule_global_dbg_annotation_fastbuild_crate_repositories () 199 200crates_repository ( 201name = "alias_rule_global_custom_annotation_none" , 202annotations = { 203"test_data_passing_crate" : [ crate . annotation ( 204alias_rule = None , 205)], 206}, 207cargo_lockfile = "//alias_rule:Cargo.Bazel.lock" , 208# `generator` is not necessary in official releases. 209# See load satement for `cargo_bazel_bootstrap`. 210generator = "@cargo_bazel_bootstrap//:cargo-bazel" , 211lockfile = "//alias_rule:cargo-bazel-lock_global_custom_annotation_none.json" , 212packages = { 213"test_data_passing_crate" : crate . spec ( 214version = "0.1.0" , 215), 216}, 217render_config = render_config ( 218default_alias_rule = "@//alias_rule:alias_rules.bzl:alias_rule" , 219), 220) 221 222load ( 223"@alias_rule_global_custom_annotation_none//:defs.bzl" , 224alias_rule_global_custom_annotation_none_crate_repositories = "crate_repositories" , 225) 226 227alias_rule_global_custom_annotation_none_crate_repositories () 228 229############################################################################### 230# C A R G O A L I A S E S 231############################################################################### 232 233crates_repository ( 234name = "cargo_aliases" , 235annotations = { 236"names" : [ crate . annotation ( 237shallow_since = "1646516410 -0700" , 238version = "0.12.1-dev" , 239)], 240}, 241cargo_lockfile = "//cargo_aliases:Cargo.Bazel.lock" , 242# `generator` is not necessary in official releases. 243# See load satement for `cargo_bazel_bootstrap`. 244generator = "@cargo_bazel_bootstrap//:cargo-bazel" , 245lockfile = "//cargo_aliases:cargo-bazel-lock.json" , 246manifests = [ "//cargo_aliases:Cargo.toml" ], 247) 248 249load ( 250"@cargo_aliases//:defs.bzl" , 251cargo_aliases_crate_repositories = "crate_repositories" , 252) 253 254cargo_aliases_crate_repositories () 255 256############################################################################### 257# C A R G O B I N D E P S 258############################################################################### 259 260crates_repository ( 261name = "crate_index_cargo_bindeps" , 262cargo_lockfile = "//cargo_bindeps:Cargo.lock" , 263generate_binaries = True , 264# `generator` is not necessary in official releases. 265# See load satement for `cargo_bazel_bootstrap`. 266generator = "@cargo_bazel_bootstrap//:cargo-bazel" , 267manifests = [ "//cargo_bindeps:Cargo.toml" ], 268rust_version = "nightly" , 269) 270 271load ( 272"@crate_index_cargo_bindeps//:defs.bzl" , 273cargo_bindeps_crate_repositories = "crate_repositories" , 274) 275 276cargo_bindeps_crate_repositories () 277 278############################################################################### 279# C A R G O L O C A L 280############################################################################### 281 282crates_repository ( 283name = "crate_index_cargo_local" , 284cargo_lockfile = "//cargo_local:Cargo.lock" , 285# `generator` is not necessary in official releases. 286# See load satement for `cargo_bazel_bootstrap`. 287generator = "@cargo_bazel_bootstrap//:cargo-bazel" , 288manifests = [ "//cargo_local:Cargo.toml" ], 289) 290 291load ( 292"@crate_index_cargo_local//:defs.bzl" , 293cargo_local_crate_repositories = "crate_repositories" , 294) 295 296cargo_local_crate_repositories () 297 298############################################################################### 299# C A R G O R E M O T E 300############################################################################### 301 302load ( "@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" ) 303 304http_archive ( 305name = "names" , 306build_file = "//cargo_remote:BUILD.names.bazel" , 307sha256 = "eab40caca5805624ba31d028913931c3d054b22daafff6f43e3435cfa9fb761e" , 308strip_prefix = "names-0.13.0" , 309urls = [ "https://github.com/fnichol/names/archive/refs/tags/v0.13.0.zip" ], 310) 311 312crates_repository ( 313name = "crate_index_cargo_remote" , 314cargo_lockfile = "@names//:Cargo.lock" , 315# `generator` is not necessary in official releases. 316# See load satement for `cargo_bazel_bootstrap`. 317generator = "@cargo_bazel_bootstrap//:cargo-bazel" , 318manifests = [ "@names//:Cargo.toml" ], 319) 320 321load ( 322"@crate_index_cargo_remote//:defs.bzl" , 323cargo_remote_crate_repositories = "crate_repositories" , 324) 325 326cargo_remote_crate_repositories () 327 328############################################################################### 329# C A R G O W O R K S P A C E 330############################################################################### 331 332crates_repository ( 333name = "crate_index_cargo_workspace" , 334cargo_config = "//cargo_workspace:.cargo/config.toml" , 335cargo_lockfile = "//cargo_workspace:Cargo.Bazel.lock" , 336# `generator` is not necessary in official releases. 337# See load satement for `cargo_bazel_bootstrap`. 338generator = "@cargo_bazel_bootstrap//:cargo-bazel" , 339lockfile = "//cargo_workspace:cargo-bazel-lock.json" , 340manifests = [ 341"//cargo_workspace:Cargo.toml" , 342"//cargo_workspace/num_printer:Cargo.toml" , 343"//cargo_workspace/printer:Cargo.toml" , 344"//cargo_workspace/rng:Cargo.toml" , 345], 346) 347 348load ( 349"@crate_index_cargo_workspace//:defs.bzl" , 350cargo_workspace_crate_repositories = "crate_repositories" , 351) 352 353cargo_workspace_crate_repositories () 354 355############################################################################### 356# C A R G O C O N D I T I O N A L D E P S 357############################################################################### 358 359crates_repository ( 360name = "crate_index_cargo_conditional_deps" , 361cargo_lockfile = "//cargo_conditional_deps:Cargo.Bazel.lock" , 362# `generator` is not necessary in official releases. 363# See load satement for `cargo_bazel_bootstrap`. 364generator = "@cargo_bazel_bootstrap//:cargo-bazel" , 365lockfile = "//cargo_conditional_deps:cargo-bazel-lock.json" , 366manifests = [ 367"//cargo_conditional_deps:Cargo.toml" , 368], 369) 370 371load ( 372"@crate_index_cargo_conditional_deps//:defs.bzl" , 373cargo_conditional_deps_crate_repositories = "crate_repositories" , 374) 375 376cargo_conditional_deps_crate_repositories () 377 378############################################################################### 379# M U L T I P A C K A G E 380############################################################################### 381 382# The name here needs to be short to avoid long path issues on windows 383# when running the `libnghttp2-sys` build script. 384multi_pkg_example_name = "m_pkgs" 385 386crates_repository ( 387name = multi_pkg_example_name , 388annotations = { 389"curl-sys" : [ crate . annotation ( 390gen_build_script = False , 391deps = [ 392"@m_pkgs__curl//:curl" , 393], 394)], 395"httpmock" : [ crate . annotation ( 396shallow_since = "1673473097 +0100" , 397)], 398"isahc" : [ crate . annotation ( 399shallow_since = "1667787880 -0600" , 400)], 401"libnghttp2-sys" : [ crate . annotation ( 402build_script_data_glob = [ "nghttp2/**" ], 403data_glob = [ "nghttp2/**" ], 404)], 405"wepoll-ffi" : [ crate . annotation ( 406build_script_data_glob = [ "vendor/**" ], 407)], 408}, 409cargo_lockfile = "//multi_package:Cargo.Bazel.lock" , 410# `generator` is not necessary in official releases. 411# See load satement for `cargo_bazel_bootstrap`. 412generator = "@cargo_bazel_bootstrap//:cargo-bazel" , 413lockfile = "//multi_package:cargo-bazel-lock.json" , 414manifests = [ 415"//multi_package/pkg_a:Cargo.toml" , 416"//multi_package/sub_pkgs/pkg_b:Cargo.toml" , 417"//multi_package/sub_pkgs/pkg_c:Cargo.toml" , 418], 419) 420 421load ( "//multi_package/3rdparty:third_party_deps.bzl" , "third_party_deps" ) 422 423third_party_deps ( 424prefix = multi_pkg_example_name , 425) 426 427load ( 428"@m_pkgs//:defs.bzl" , 429multi_pkg_crate_repositories = "crate_repositories" , 430) 431 432multi_pkg_crate_repositories () 433 434############################################################################### 435# N O C A R G O M A N I F E S T S 436############################################################################### 437 438crates_repository ( 439name = "no_cargo" , 440annotations = { 441"axum" : [ crate . annotation ( 442compile_data_glob = [ "**/*.md" ], 443)], 444}, 445cargo_lockfile = "//no_cargo_manifests:Cargo.Bazel.lock" , 446# `generator` is not necessary in official releases. 447# See load satement for `cargo_bazel_bootstrap`. 448generator = "@cargo_bazel_bootstrap//:cargo-bazel" , 449lockfile = "//no_cargo_manifests:cargo-bazel-lock.json" , 450packages = { 451"axum" : crate . spec ( 452version = "0.4.0" , 453), 454"hyper" : crate . spec ( 455features = [ "full" ], 456version = "0.14.22" , 457), 458"mime" : crate . spec ( 459version = "0.3" , 460), 461"serde_json" : crate . spec ( 462version = "1.0" , 463), 464# TODO: This dependency is added and pinned forward due to the 465# following issue: https://github.com/hyperium/hyper/issues/3038 466"socket2" : crate . spec ( 467features = [ "all" ], 468version = "0.4.7" , 469), 470"tokio" : crate . spec ( 471features = [ "full" ], 472version = "1.17.0" , 473), 474"tower" : crate . spec ( 475features = [ "util" ], 476version = "0.4" , 477), 478"tower-http" : crate . spec ( 479features = [ "trace" ], 480version = "0.2.1" , 481), 482"tracing" : crate . spec ( 483version = "0.1" , 484), 485"tracing-subscriber" : crate . spec ( 486version = "0.3" , 487), 488}, 489splicing_config = splicing_config ( 490resolver_version = "2" , 491), 492) 493 494load ( 495"@no_cargo//:defs.bzl" , 496no_cargo_crate_repositories = "crate_repositories" , 497) 498 499no_cargo_crate_repositories () 500 501############################################################################### 502# U S I N G C X X C R A T E 503############################################################################### 504 505# CXX crate is a bit different since there are C++ headers provided. 506 507crates_repository ( 508name = "using_cxx" , 509cargo_lockfile = "//using_cxx:Cargo.Bazel.lock" , 510# `generator` is not necessary in official releases. 511# See load satement for `cargo_bazel_bootstrap`. 512generator = "@cargo_bazel_bootstrap//:cargo-bazel" , 513lockfile = "//using_cxx:cargo-bazel-lock.json" , 514packages = { 515"cxx" : crate . spec ( 516version = "1.0.109" , 517), 518}, 519splicing_config = splicing_config ( 520resolver_version = "2" , 521), 522) 523 524load ( 525"@using_cxx//:defs.bzl" , 526using_cxx_crate_repositories = "crate_repositories" , 527) 528 529using_cxx_crate_repositories () 530 531# The codegen tool needed by cxx. 532http_archive ( 533name = "cxxbridge-cmd" , 534build_file_content = """ 535load("@rules_rust//rust:defs.bzl", "rust_binary") 536load("@cxxbridge_cmd_deps//:defs.bzl", "aliases", "all_crate_deps") 537 538rust_binary( 539name = "cxxbridge-cmd", 540srcs = glob(["src/**/*.rs"]), 541aliases = aliases(), 542compile_data = [ 543"src/gen/include/cxx.h", 544], 545edition = "2021", 546visibility = ["//visibility:public"], 547deps = all_crate_deps( 548normal = True, 549), 550) 551""" , 552sha256 = "d93600487d429c8bf013ee96719af4e62e809ac57fc4cac24f17cf58e4526009" , 553strip_prefix = "cxxbridge-cmd-1.0.109" , 554type = "tar.gz" , 555urls = [ "https://static.crates.io/crates/cxxbridge-cmd/cxxbridge-cmd-1.0.109.crate" ], 556) 557 558crates_repository ( 559name = "cxxbridge_cmd_deps" , 560cargo_lockfile = "//using_cxx:cxxbridge-cmd.Cargo.lock" , 561# `generator` is not necessary in official releases. 562# See load satement for `cargo_bazel_bootstrap`. 563generator = "@cargo_bazel_bootstrap//:cargo-bazel" , 564lockfile = "//using_cxx:cxxbridge-cmd.Cargo.Bazel.lock" , 565manifests = [ "@cxxbridge-cmd//:Cargo.toml" ], 566splicing_config = splicing_config ( 567resolver_version = "2" , 568), 569) 570 571load ( "@cxxbridge_cmd_deps//:defs.bzl" , cxxbridge_cmd_deps = "crate_repositories" ) 572 573cxxbridge_cmd_deps () 574 575############################################################################### 576# V E N D O R E X T E R N A L 577############################################################################### 578 579http_archive ( 580name = "names_external" , 581build_file = "//cargo_remote:BUILD.names.bazel" , 582sha256 = "eab40caca5805624ba31d028913931c3d054b22daafff6f43e3435cfa9fb761e" , 583strip_prefix = "names-0.13.0" , 584urls = [ "https://github.com/fnichol/names/archive/refs/tags/v0.13.0.zip" ], 585) 586 587load ( 588"//vendor_external/crates:crates.bzl" , 589crates_vendor_external_repositories = "crate_repositories" , 590) 591 592crates_vendor_external_repositories () 593 594############################################################################### 595# V E N D O R R E M O T E M A N I F E S T S 596############################################################################### 597 598load ( 599"//vendor_remote_manifests/crates:crates.bzl" , 600crates_vendor_manifests_repositories = "crate_repositories" , 601) 602 603crates_vendor_manifests_repositories () 604 605############################################################################### 606# V E N D O R R E M O T E P A C K A G E S 607############################################################################### 608 609load ( 610"//vendor_remote_pkgs/crates:crates.bzl" , 611crates_vendor_packages_repositories = "crate_repositories" , 612) 613 614crates_vendor_packages_repositories () 615 616############################################################################### 617# C O M P L I C A T E D D E P E N D E N C I E S 618############################################################################### 619 620http_archive ( 621name = "rules_foreign_cc" , 622sha256 = "1eee5d216a3cec7a4c731f71ed731ac353290b1db61ab68b79440655bcb9acaa" , 623strip_prefix = "rules_foreign_cc-7ce62009557d73da9aa0d2a1ca7eded49078b3cf" , 624# Pulls in https://github.com/bazelbuild/rules_foreign_cc/pull/1163 and https://github.com/bazelbuild/rules_foreign_cc/pull/1199 which aren't currently in a release. 625url = "https://github.com/bazelbuild/rules_foreign_cc/archive/7ce62009557d73da9aa0d2a1ca7eded49078b3cf.tar.gz" , 626) 627 628load ( "@rules_foreign_cc//foreign_cc:repositories.bzl" , "rules_foreign_cc_dependencies" ) 629 630rules_foreign_cc_dependencies () 631 632http_archive ( 633name = "aspect_bazel_lib" , 634sha256 = "f5ea76682b209cc0bd90d0f5a3b26d2f7a6a2885f0c5f615e72913f4805dbb0d" , 635strip_prefix = "bazel-lib-2.5.0" , 636url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.5.0/bazel-lib-v2.5.0.tar.gz" , 637) 638 639load ( "@aspect_bazel_lib//lib:repositories.bzl" , "aspect_bazel_lib_dependencies" , "aspect_bazel_lib_register_toolchains" ) 640 641aspect_bazel_lib_dependencies () 642 643aspect_bazel_lib_register_toolchains () 644 645load ( "@bazel_tools//tools/build_defs/repo:git.bzl" , "git_repository" ) 646 647git_repository ( 648name = "boringssl" , 649commit = "44b3df6f03d85c901767250329c571db405122d5" , 650patch_args = [ "-p1" ], 651patches = [ 652"//complicated_dependencies:boringssl-filegroup.patch" , 653# On the macOS bazelci builders, there's a system-installed openssl, and that takes priority over -isystem flags, which is what cc_library.includes uses. 654# This forces our local system-includes to be chosen with higher priority, which avoids conflicts. 655"//complicated_dependencies:boringssl-system-includes.patch" , 656], 657remote = "https://github.com/google/boringssl.git" , 658) 659 660crates_repository ( 661name = "complicated_dependencies" , 662annotations = { 663# boringssl natively builds with Bazel, but boring-sys tries to build it with cmake. 664# We could pass boring-sys a cmake binary it can invoke, but the boring-sys build script wouldn't get to exploit the caching and parallelism of full Bazel builds of boringssl. 665# Instead, we use the build script env var hooks to point the build script at the output of Bazel building boringssl. 666"boring-sys" : [ 667crate . annotation ( 668build_script_data = [ 669"@//complicated_dependencies:boringssl_gen_dir" , 670"@boringssl//:headers" , 671], 672build_script_env = { 673# Ideally this would use an execpath macro, but we need to point at a directory and that's fiddly. We could probably copy the directory somewhere and point at that... For now, this works. 674"BORING_BSSL_INCLUDE_PATH" : "$${pwd}/external/boringssl/src/include" , 675"BORING_BSSL_PATH" : "$(execpath @//complicated_dependencies:boringssl_gen_dir)" , 676}, 677compile_data = [ 678"@//complicated_dependencies:boringssl_gen_dir" , 679"@boringssl//:headers" , 680], 681), 682], 683# zlib-ng-sys's build script invokes cmake, so we need to make cmake available. 684# Fortunately, rules_foreign_cc has a cmake toolchain we can use. 685"libz-ng-sys" : [ crate . annotation ( 686# Setting build_script_data makes the files available on disk when the rule runs. 687build_script_data = [ "@rules_foreign_cc//toolchains:current_cmake_toolchain" ], 688build_script_env = { 689# The toolchain supplies a value of $(CMAKE) which is an execroot-relative path, so we need to prefix it with $${pwd}/ because build scripts don't typically run in the execroot unlike most bazel rules, for improved compatibility with Cargo. 690"CMAKE" : "$${pwd}/$(CMAKE)" , 691}, 692# Setting build_script_toolchains makes makefile variable substitution work so that we can reference $(CNAME) in attributes. 693build_script_toolchains = [ "@rules_foreign_cc//toolchains:current_cmake_toolchain" ], 694)], 695}, 696cargo_lockfile = "//complicated_dependencies:Cargo.Bazel.lock" , 697# `generator` is not necessary in official releases. 698# See load satement for `cargo_bazel_bootstrap`. 699generator = "@cargo_bazel_bootstrap//:cargo-bazel" , 700lockfile = "//complicated_dependencies:cargo-bazel-lock.json" , 701packages = { 702"boring" : crate . spec ( 703version = "3.0.4" , 704), 705"libz-ng-sys" : crate . spec ( 706version = "=1.1.15" , 707), 708}, 709splicing_config = splicing_config ( 710resolver_version = "2" , 711), 712) 713 714load ( 715"@complicated_dependencies//:defs.bzl" , 716complicated_dependencies_crate_repositories = "crate_repositories" , 717) 718 719complicated_dependencies_crate_repositories () 720 721############################################################################### 722# O V E R R I D E T A R G E T 723############################################################################### 724 725crates_repository ( 726name = "override_target" , 727annotations = { 728"foo" : [ crate . annotation ( 729override_targets = { "lib" : "@//override_target:foo" }, 730)], 731}, 732cargo_lockfile = "//override_target:Cargo.Bazel.lock" , 733# `generator` is not necessary in official releases. 734# See load satement for `cargo_bazel_bootstrap`. 735generator = "@cargo_bazel_bootstrap//:cargo-bazel" , 736lockfile = "//override_target:cargo-bazel-lock.json" , 737packages = { 738"foo" : crate . spec ( 739version = "0.0.0" , 740), 741}, 742splicing_config = splicing_config ( 743resolver_version = "2" , 744), 745) 746 747load ( 748"@override_target//:defs.bzl" , 749override_target_crate_repositories = "crate_repositories" , 750) 751 752override_target_crate_repositories () 753 754############################################################################### 755 756# Used for Bazel CI 757http_archive ( 758name = "bazelci_rules" , 759sha256 = "eca21884e6f66a88c358e580fd67a6b148d30ab57b1680f62a96c00f9bc6a07e" , 760strip_prefix = "bazelci_rules-1.0.0" , 761url = "https://github.com/bazelbuild/continuous-integration/releases/download/rules-1.0.0/bazelci_rules-1.0.0.tar.gz" , 762) 763 764load ( "@bazelci_rules//:rbe_repo.bzl" , "rbe_preconfig" ) 765 766# Creates a default toolchain config for RBE. 767# Use this as is if you are using the rbe_ubuntu16_04 container, 768# otherwise refer to RBE docs. 769rbe_preconfig ( 770name = "buildkite_config" , 771toolchain = "ubuntu1804-bazel-java11" , 772)