|
| 1 | +workspace(name = "examples") |
| 2 | + |
| 3 | +local_repository( |
| 4 | + name = "rules_rust", |
| 5 | + path = "../../", |
| 6 | +) |
| 7 | + |
| 8 | +load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains") |
| 9 | + |
| 10 | +rules_rust_dependencies() |
| 11 | + |
| 12 | +rust_register_toolchains( |
| 13 | + edition = "2018", |
| 14 | + extra_target_triples = [ |
| 15 | + "aarch64-apple-ios-sim", |
| 16 | + "x86_64-apple-ios", |
| 17 | + ], |
| 18 | +) |
| 19 | + |
| 20 | +load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies") |
| 21 | + |
| 22 | +crate_universe_dependencies(bootstrap = True) |
| 23 | + |
| 24 | +load("@rules_rust//crate_universe:defs.bzl", "crates_repository", "splicing_config") |
| 25 | + |
| 26 | +crates_repository( |
| 27 | + name = "ios_build", |
| 28 | + cargo_lockfile = "//:Cargo.Bazel.lock", |
| 29 | + # `generator` is not necessary in official releases. |
| 30 | + # See load satement for `cargo_bazel_bootstrap`. |
| 31 | + generator = "@cargo_bazel_bootstrap//:cargo-bazel", |
| 32 | + lockfile = "//:cargo-bazel-lock.json", |
| 33 | + manifests = ["//:Cargo.toml"], |
| 34 | + splicing_config = splicing_config( |
| 35 | + resolver_version = "2", |
| 36 | + ), |
| 37 | +) |
| 38 | + |
| 39 | +load( |
| 40 | + "@ios_build//:defs.bzl", |
| 41 | + ios_build_crate_repositories = "crate_repositories", |
| 42 | +) |
| 43 | + |
| 44 | +ios_build_crate_repositories() |
| 45 | + |
| 46 | +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| 47 | + |
| 48 | +# Used for Bazel CI |
| 49 | +http_archive( |
| 50 | + name = "bazelci_rules", |
| 51 | + sha256 = "eca21884e6f66a88c358e580fd67a6b148d30ab57b1680f62a96c00f9bc6a07e", |
| 52 | + strip_prefix = "bazelci_rules-1.0.0", |
| 53 | + url = "https://github.com/bazelbuild/continuous-integration/releases/download/rules-1.0.0/bazelci_rules-1.0.0.tar.gz", |
| 54 | +) |
| 55 | + |
| 56 | +load("@bazelci_rules//:rbe_repo.bzl", "rbe_preconfig") |
| 57 | + |
| 58 | +# Creates a default toolchain config for RBE. |
| 59 | +# Use this as is if you are using the rbe_ubuntu16_04 container, |
| 60 | +# otherwise refer to RBE docs. |
| 61 | +rbe_preconfig( |
| 62 | + name = "buildkite_config", |
| 63 | + toolchain = "ubuntu1804-bazel-java11", |
| 64 | +) |
0 commit comments