xref: /aosp_15_r20/external/bazelbuild-rules_rust/test/genquery/BUILD.bazel (revision d4726bddaa87cc4778e7472feed243fa4b6c267f)
1*d4726bddSHONG Yifanload("//rust:defs.bzl", "rust_binary", "rust_library")
2*d4726bddSHONG Yifan
3*d4726bddSHONG Yifanrust_library(
4*d4726bddSHONG Yifan    name = "bar",
5*d4726bddSHONG Yifan    srcs = ["bar.rs"],
6*d4726bddSHONG Yifan    edition = "2021",
7*d4726bddSHONG Yifan)
8*d4726bddSHONG Yifan
9*d4726bddSHONG Yifangenquery(
10*d4726bddSHONG Yifan    name = "bar_deps",
11*d4726bddSHONG Yifan    expression = "deps(//test/genquery:bar)",
12*d4726bddSHONG Yifan    scope = [":bar"],
13*d4726bddSHONG Yifan)
14*d4726bddSHONG Yifan
15*d4726bddSHONG Yifanrust_binary(
16*d4726bddSHONG Yifan    name = "foo",
17*d4726bddSHONG Yifan    srcs = ["foo.rs"],
18*d4726bddSHONG Yifan    edition = "2021",
19*d4726bddSHONG Yifan    deps = [":bar"],
20*d4726bddSHONG Yifan)
21*d4726bddSHONG Yifan
22*d4726bddSHONG Yifangenquery(
23*d4726bddSHONG Yifan    name = "foo_deps",
24*d4726bddSHONG Yifan    expression = "deps(//test/genquery:foo)",
25*d4726bddSHONG Yifan    scope = [":foo"],
26*d4726bddSHONG Yifan)
27