fork/rules_rust

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

UebelAndreexclude `BUILD` and `WORKSPACE` files from generated crate_universe targets (#1437)60f26d49

0.7.0
4.3 KiB184 linesraw
1###############################################################################
2# @generated
3# This file is auto-generated by the cargo-bazel tool.
4#
5# DO NOT MODIFY: Local changes may be replaced in future executions.
6###############################################################################
7
8load(
9    "@bazel_skylib//lib:selects.bzl",
10    "selects",
11)
12load(
13    "@rules_rust//cargo:defs.bzl",
14    "cargo_build_script",
15)
16
17# buildifier: disable=bzl-visibility
18load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or")
19load(
20    "@rules_rust//rust:defs.bzl",
21    "rust_library",
22)
23
24package(default_visibility = ["//visibility:public"])
25
26# licenses([
27#     "TODO",  # MIT OR Apache-2.0
28# ])
29
30rust_library(
31    name = "serde",
32    srcs = glob(
33        include = [
34            "**/*.rs",
35        ],
36        exclude = [
37        ],
38    ),
39    aliases = selects.with_or({
40        "//conditions:default": {
41        },
42    }),
43    compile_data = glob(
44        include = ["**"],
45        exclude = [
46            "BUILD",
47            "BUILD.bazel",
48            "WORKSPACE",
49            "WORKSPACE.bazel",
50        ],
51    ) + select_with_or({
52        "//conditions:default": [
53        ],
54    }),
55    crate_features = [
56        "default",
57        "derive",
58        "rc",
59        "serde_derive",
60        "std",
61    ],
62    crate_root = "src/lib.rs",
63    data = select_with_or({
64        "//conditions:default": [
65        ],
66    }),
67    edition = "2015",
68    proc_macro_deps = [
69    ] + select_with_or({
70        "//conditions:default": [
71            "@crate_universe_crate_index__serde_derive-1.0.138//:serde_derive",
72        ],
73    }),
74    rustc_env = {
75    },
76    rustc_env_files = select_with_or({
77        "//conditions:default": [
78        ],
79    }),
80    rustc_flags = [
81        # In most cases, warnings in 3rd party crates are not interesting as
82        # they're out of the control of consumers. The flag here silences
83        # warnings. For more details see:
84        # https://doc.rust-lang.org/rustc/lints/levels.html
85        "--cap-lints=allow",
86    ],
87    tags = [
88        "cargo-bazel",
89        "manual",
90        "noclippy",
91        "norustfmt",
92    ],
93    version = "1.0.138",
94    deps = [
95    ] + select_with_or({
96        "//conditions:default": [
97            "@crate_universe_crate_index__serde-1.0.138//:build_script_build",
98        ],
99    }),
100)
101
102cargo_build_script(
103    # See comment associated with alias. Do not change this name
104    name = "serde_build_script",
105    srcs = glob(
106        include = [
107            "**/*.rs",
108        ],
109        exclude = [
110        ],
111    ),
112    aliases = selects.with_or({
113        "//conditions:default": {
114        },
115    }),
116    build_script_env = {
117    },
118    compile_data = select_with_or({
119        "//conditions:default": [
120        ],
121    }),
122    crate_features = [
123        "default",
124        "derive",
125        "rc",
126        "serde_derive",
127        "std",
128    ],
129    crate_name = "build_script_build",
130    crate_root = "build.rs",
131    data = glob(["**"]) + select_with_or({
132        "//conditions:default": [
133        ],
134    }),
135    edition = "2015",
136    proc_macro_deps = [
137    ] + select_with_or({
138        "//conditions:default": [
139        ],
140    }),
141    rustc_env = {
142    },
143    rustc_env_files = select_with_or({
144        "//conditions:default": [
145        ],
146    }),
147    rustc_flags = [
148        # In most cases, warnings in 3rd party crates are not interesting as
149        # they're out of the control of consumers. The flag here silences
150        # warnings. For more details see:
151        # https://doc.rust-lang.org/rustc/lints/levels.html
152        "--cap-lints=allow",
153    ],
154    tags = [
155        "cargo-bazel",
156        "manual",
157        "noclippy",
158        "norustfmt",
159    ],
160    tools = select_with_or({
161        "//conditions:default": [
162        ],
163    }),
164    version = "1.0.138",
165    visibility = ["//visibility:private"],
166    deps = [
167    ] + select_with_or({
168        "//conditions:default": [
169        ],
170    }),
171)
172
173alias(
174    # Because `cargo_build_script` does some invisible target name mutating to
175    # determine the package and crate name for a build script, the Bazel
176    # target namename of any build script cannot be the Cargo canonical name
177    # of `build_script_build` without losing out on having certain Cargo
178    # environment variables set.
179    name = "build_script_build",
180    actual = "serde_build_script",
181    tags = [
182        "manual",
183    ],
184)