• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1load("//cargo:defs.bzl", "cargo_build_script")
2load("//rust:defs.bzl", "rust_library", "rust_test")
3
4environment_group(
5    name = "foo_environment",
6    defaults = [":foo"],
7    environments = [
8        ":foo",
9        ":bar",
10    ],
11)
12
13environment(
14    name = "foo",
15)
16
17environment(
18    name = "bar",
19)
20
21rust_library(
22    name = "build_script_dep_without_compatible_with",
23    srcs = ["lib.rs"],
24    edition = "2018",
25)
26
27cargo_build_script(
28    name = "empty_build_script",
29    srcs = ["do_nothing.rs"],
30    compatible_with = [":bar"],
31    edition = "2018",
32    deps = [":build_script_dep_without_compatible_with"],
33)
34
35rust_test(
36    name = "test_compatible_with",
37    srcs = ["lib.rs"],
38    compatible_with = [":bar"],
39    edition = "2018",
40    deps = [":empty_build_script"],
41)
42