fork/rules_rust

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

UebelAndreUpdated proto rules to fetch dependencies using crate_universe (#1491)83a03ab0

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