fork/rules_rust

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

David TolnayGenerate only the needed subset of binaries for bindgen and proto (#1751)7ebad4d5

rust-analyzer
1.9 KiB73 linesraw
1load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
2load("//crate_universe:defs.bzl", "crate", "crates_vendor")
3
4crates_vendor(
5    name = "crates_vendor",
6    annotations = {
7        "grpc-compiler": [crate.annotation(
8            gen_binaries = ["protoc-gen-rust-grpc"],
9        )],
10        "lazy_static": [crate.annotation(
11            rustc_flags = [
12                "--cfg=lazy_static_heap_impl",
13            ],
14        )],
15        "protobuf": [crate.annotation(
16            patch_args = ["-p1"],
17            patches = ["@rules_rust//proto/3rdparty/patches:protobuf-2.8.2.patch"],
18        )],
19        "protobuf-codegen": [crate.annotation(
20            gen_binaries = ["protoc-gen-rust"],
21        )],
22    },
23    cargo_lockfile = "Cargo.Bazel.lock",
24    mode = "remote",
25    packages = {
26        "grpc": crate.spec(
27            version = "0.6.2",
28        ),
29        "grpc-compiler": crate.spec(
30            version = "0.6.2",
31        ),
32        "log": crate.spec(
33            version = "0.4, 0.4.7",
34        ),
35        "protobuf": crate.spec(
36            features = ["with-bytes"],
37            version = "2.8.2",
38        ),
39        "protobuf-codegen": crate.spec(
40            version = "2.8.2",
41        ),
42        "tls-api": crate.spec(
43            version = "0.1.22",
44        ),
45        "tls-api-stub": crate.spec(
46            version = "0.1.22",
47        ),
48    },
49    repository_name = "rules_rust_proto",
50    tags = ["manual"],
51)
52
53alias(
54    name = "wasm_bindgen_cli",
55    actual = "@rules_rust_wasm_bindgen_cli",
56    tags = ["manual"],
57    visibility = ["//visibility:public"],
58)
59
60alias(
61    name = "wasm_bindgen",
62    actual = "//wasm_bindgen/3rdparty/crates:wasm-bindgen",
63    visibility = ["//visibility:public"],
64)
65
66bzl_library(
67    name = "bzl_lib",
68    srcs = [
69        "//proto/3rdparty/crates:crates.bzl",
70        "//proto/3rdparty/crates:defs.bzl",
71    ],
72    visibility = ["//proto:__pkg__"],
73)