xref: /aosp_15_r20/external/bazelbuild-rules_rust/rust/toolchain/BUILD.bazel (revision d4726bddaa87cc4778e7472feed243fa4b6c267f)
1*d4726bddSHONG Yifanload("//rust/private:rustfmt.bzl", "current_rustfmt_toolchain")
2*d4726bddSHONG Yifanload("//rust/private:toolchain_utils.bzl", "current_rust_toolchain", "toolchain_files", "toolchain_files_for_target")
3*d4726bddSHONG Yifan
4*d4726bddSHONG Yifanpackage(default_visibility = ["//visibility:public"])
5*d4726bddSHONG Yifan
6*d4726bddSHONG Yifantoolchain_files(
7*d4726bddSHONG Yifan    name = "current_cargo_files",
8*d4726bddSHONG Yifan    tool = "cargo",
9*d4726bddSHONG Yifan)
10*d4726bddSHONG Yifan
11*d4726bddSHONG Yifantoolchain_files(
12*d4726bddSHONG Yifan    name = "current_clippy_files",
13*d4726bddSHONG Yifan    tool = "clippy",
14*d4726bddSHONG Yifan)
15*d4726bddSHONG Yifan
16*d4726bddSHONG Yifantoolchain_files(
17*d4726bddSHONG Yifan    name = "current_cargo_clippy_files",
18*d4726bddSHONG Yifan    tool = "cargo-clippy",
19*d4726bddSHONG Yifan)
20*d4726bddSHONG Yifan
21*d4726bddSHONG Yifantoolchain_files(
22*d4726bddSHONG Yifan    name = "current_rustc_files",
23*d4726bddSHONG Yifan    tool = "rustc",
24*d4726bddSHONG Yifan)
25*d4726bddSHONG Yifan
26*d4726bddSHONG Yifantoolchain_files(
27*d4726bddSHONG Yifan    name = "current_rustdoc_files",
28*d4726bddSHONG Yifan    tool = "rustdoc",
29*d4726bddSHONG Yifan)
30*d4726bddSHONG Yifan
31*d4726bddSHONG Yifantoolchain_files(
32*d4726bddSHONG Yifan    name = "current_rustc_lib_files",
33*d4726bddSHONG Yifan    tool = "rustc_lib",
34*d4726bddSHONG Yifan)
35*d4726bddSHONG Yifan
36*d4726bddSHONG Yifantoolchain_files(
37*d4726bddSHONG Yifan    name = "current_rust_stdlib_files",
38*d4726bddSHONG Yifan    tool = "rust_stdlib",
39*d4726bddSHONG Yifan)
40*d4726bddSHONG Yifan
41*d4726bddSHONG Yifancurrent_rust_toolchain(
42*d4726bddSHONG Yifan    name = "current_rust_toolchain",
43*d4726bddSHONG Yifan)
44*d4726bddSHONG Yifan
45*d4726bddSHONG Yifancurrent_rustfmt_toolchain(
46*d4726bddSHONG Yifan    name = "current_rustfmt_toolchain",
47*d4726bddSHONG Yifan)
48*d4726bddSHONG Yifan
49*d4726bddSHONG Yifantoolchain_files_for_target(
50*d4726bddSHONG Yifan    name = "current_rustfmt_toolchain_for_target",
51*d4726bddSHONG Yifan    toolchain_files = ":current_rustfmt_toolchain",
52*d4726bddSHONG Yifan    visibility = ["//:__subpackages__"],
53*d4726bddSHONG Yifan)
54*d4726bddSHONG Yifan
55*d4726bddSHONG Yifanalias(
56*d4726bddSHONG Yifan    name = "current_rustfmt_files",
57*d4726bddSHONG Yifan    actual = "current_rustfmt_toolchain",
58*d4726bddSHONG Yifan    deprecation = "Instead use `@rules_rust//rust/toolchain:current_rustfmt_toolchain",
59*d4726bddSHONG Yifan)
60