xref: /aosp_15_r20/external/bazelbuild-rules_rust/examples/ios_build/WORKSPACE.bazel (revision d4726bddaa87cc4778e7472feed243fa4b6c267f)
1*d4726bddSHONG Yifanworkspace(name = "rules_rust_examples_ios_build")
2*d4726bddSHONG Yifan
3*d4726bddSHONG Yifanlocal_repository(
4*d4726bddSHONG Yifan    name = "rules_rust",
5*d4726bddSHONG Yifan    path = "../../",
6*d4726bddSHONG Yifan)
7*d4726bddSHONG Yifan
8*d4726bddSHONG Yifanload("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains")
9*d4726bddSHONG Yifan
10*d4726bddSHONG Yifanrules_rust_dependencies()
11*d4726bddSHONG Yifan
12*d4726bddSHONG Yifanrust_register_toolchains(
13*d4726bddSHONG Yifan    edition = "2018",
14*d4726bddSHONG Yifan    extra_target_triples = [
15*d4726bddSHONG Yifan        "aarch64-apple-ios-sim",
16*d4726bddSHONG Yifan        "x86_64-apple-ios",
17*d4726bddSHONG Yifan    ],
18*d4726bddSHONG Yifan)
19*d4726bddSHONG Yifan
20*d4726bddSHONG Yifanload("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies")
21*d4726bddSHONG Yifan
22*d4726bddSHONG Yifancrate_universe_dependencies(bootstrap = True)
23*d4726bddSHONG Yifan
24*d4726bddSHONG Yifanload(
25*d4726bddSHONG Yifan    "//3rdparty/crates:crates.bzl",
26*d4726bddSHONG Yifan    ios_build_crate_repositories = "crate_repositories",
27*d4726bddSHONG Yifan)
28*d4726bddSHONG Yifan
29*d4726bddSHONG Yifanios_build_crate_repositories()
30*d4726bddSHONG Yifan
31*d4726bddSHONG Yifanload("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
32*d4726bddSHONG Yifan
33*d4726bddSHONG Yifan# Used for Bazel CI
34*d4726bddSHONG Yifanhttp_archive(
35*d4726bddSHONG Yifan    name = "bazelci_rules",
36*d4726bddSHONG Yifan    sha256 = "eca21884e6f66a88c358e580fd67a6b148d30ab57b1680f62a96c00f9bc6a07e",
37*d4726bddSHONG Yifan    strip_prefix = "bazelci_rules-1.0.0",
38*d4726bddSHONG Yifan    url = "https://github.com/bazelbuild/continuous-integration/releases/download/rules-1.0.0/bazelci_rules-1.0.0.tar.gz",
39*d4726bddSHONG Yifan)
40*d4726bddSHONG Yifan
41*d4726bddSHONG Yifanload("@bazelci_rules//:rbe_repo.bzl", "rbe_preconfig")
42*d4726bddSHONG Yifan
43*d4726bddSHONG Yifan# Creates a default toolchain config for RBE.
44*d4726bddSHONG Yifan# Use this as is if you are using the rbe_ubuntu16_04 container,
45*d4726bddSHONG Yifan# otherwise refer to RBE docs.
46*d4726bddSHONG Yifanrbe_preconfig(
47*d4726bddSHONG Yifan    name = "buildkite_config",
48*d4726bddSHONG Yifan    toolchain = "ubuntu1804-bazel-java11",
49*d4726bddSHONG Yifan)
50*d4726bddSHONG Yifan
51*d4726bddSHONG Yifanload(
52*d4726bddSHONG Yifan    "@build_bazel_apple_support//lib:repositories.bzl",
53*d4726bddSHONG Yifan    "apple_support_dependencies",
54*d4726bddSHONG Yifan)
55*d4726bddSHONG Yifan
56*d4726bddSHONG Yifanapple_support_dependencies()
57