fork/rules_rust

git clone https://git.julia.blue/fork/rules_rust

UebelAndreDelete deprecated `rules` targets (#1210)cde4c082

0.7.0
1.3 KiB43 linesraw
1load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
2load("@bazel_skylib//rules:common_settings.bzl", "bool_flag", "string_flag")
3
4package(default_visibility = ["//visibility:public"])
5
6# A flag controlling whether to rename first-party crates such that their names
7# encode the Bazel package and target name, instead of just the target name.
8#
9# First-party vs. third-party crates are identified using the value of
10# //settings:third_party_dir.
11bool_flag(
12    name = "rename_first_party_crates",
13    build_setting_default = False,
14)
15
16# A flag specifying the location of vendored third-party rust crates within this
17# repository that must not be renamed when `rename_first_party_crates` is enabled.
18#
19# Must be specified as a Bazel package, e.g. "//some/location/in/repo".
20string_flag(
21    name = "third_party_dir",
22    build_setting_default = "//third_party/rust",
23)
24
25# A flag to control whether rust_library and rust_binary targets should
26# implicitly depend on the *real* import macro, or on a no-op target.
27bool_flag(
28    name = "use_real_import_macro",
29    build_setting_default = False,
30)
31
32bzl_library(
33    name = "bzl_lib",
34    srcs = glob(["**/*.bzl"]),
35)
36
37filegroup(
38    name = "distro",
39    srcs = glob(["*.bzl"]) + [
40        "BUILD.bazel",
41    ],
42    visibility = ["//:__subpackages__"],
43)