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.6 KiB192 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 = "syn",
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        "clone-impls",
57        "default",
58        "derive",
59        "full",
60        "parsing",
61        "printing",
62        "proc-macro",
63        "quote",
64    ],
65    crate_root = "src/lib.rs",
66    data = select_with_or({
67        "//conditions:default": [
68        ],
69    }),
70    edition = "2018",
71    proc_macro_deps = [
72    ] + select_with_or({
73        "//conditions:default": [
74        ],
75    }),
76    rustc_env = {
77    },
78    rustc_env_files = select_with_or({
79        "//conditions:default": [
80        ],
81    }),
82    rustc_flags = [
83        # In most cases, warnings in 3rd party crates are not interesting as
84        # they're out of the control of consumers. The flag here silences
85        # warnings. For more details see:
86        # https://doc.rust-lang.org/rustc/lints/levels.html
87        "--cap-lints=allow",
88    ],
89    tags = [
90        "cargo-bazel",
91        "manual",
92        "noclippy",
93        "norustfmt",
94    ],
95    version = "1.0.98",
96    deps = [
97    ] + select_with_or({
98        "//conditions:default": [
99            "@crate_universe_crate_index__proc-macro2-1.0.40//:proc_macro2",
100            "@crate_universe_crate_index__quote-1.0.20//:quote",
101            "@crate_universe_crate_index__syn-1.0.98//:build_script_build",
102            "@crate_universe_crate_index__unicode-ident-1.0.1//:unicode_ident",
103        ],
104    }),
105)
106
107cargo_build_script(
108    # See comment associated with alias. Do not change this name
109    name = "syn_build_script",
110    srcs = glob(
111        include = [
112            "**/*.rs",
113        ],
114        exclude = [
115        ],
116    ),
117    aliases = selects.with_or({
118        "//conditions:default": {
119        },
120    }),
121    build_script_env = {
122    },
123    compile_data = select_with_or({
124        "//conditions:default": [
125        ],
126    }),
127    crate_features = [
128        "clone-impls",
129        "default",
130        "derive",
131        "full",
132        "parsing",
133        "printing",
134        "proc-macro",
135        "quote",
136    ],
137    crate_name = "build_script_build",
138    crate_root = "build.rs",
139    data = glob(["**"]) + select_with_or({
140        "//conditions:default": [
141        ],
142    }),
143    edition = "2018",
144    proc_macro_deps = [
145    ] + select_with_or({
146        "//conditions:default": [
147        ],
148    }),
149    rustc_env = {
150    },
151    rustc_env_files = select_with_or({
152        "//conditions:default": [
153        ],
154    }),
155    rustc_flags = [
156        # In most cases, warnings in 3rd party crates are not interesting as
157        # they're out of the control of consumers. The flag here silences
158        # warnings. For more details see:
159        # https://doc.rust-lang.org/rustc/lints/levels.html
160        "--cap-lints=allow",
161    ],
162    tags = [
163        "cargo-bazel",
164        "manual",
165        "noclippy",
166        "norustfmt",
167    ],
168    tools = select_with_or({
169        "//conditions:default": [
170        ],
171    }),
172    version = "1.0.98",
173    visibility = ["//visibility:private"],
174    deps = [
175    ] + select_with_or({
176        "//conditions:default": [
177        ],
178    }),
179)
180
181alias(
182    # Because `cargo_build_script` does some invisible target name mutating to
183    # determine the package and crate name for a build script, the Bazel
184    # target namename of any build script cannot be the Cargo canonical name
185    # of `build_script_build` without losing out on having certain Cargo
186    # environment variables set.
187    name = "build_script_build",
188    actual = "syn_build_script",
189    tags = [
190        "manual",
191    ],
192)