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.3 KiB53 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        "bindgen": [crate.annotation(
8            gen_binaries = ["bindgen"],
9            gen_build_script = True,
10        )],
11        "clang-sys": [crate.annotation(
12            gen_build_script = True,
13        )],
14        "indexmap": [crate.annotation(
15            gen_build_script = True,
16        )],
17        "libloading": [crate.annotation(
18            gen_build_script = True,
19        )],
20        "log": [crate.annotation(
21            rustc_flags = ["--cfg=atomic_cas"],
22        )],
23    },
24    cargo_lockfile = "Cargo.Bazel.lock",
25    generate_build_scripts = False,
26    mode = "remote",
27    packages = {
28        "bindgen": crate.spec(
29            version = "0.60.1",
30        ),
31        "libloading": crate.spec(
32            version = "0.7.3",
33        ),
34    },
35    repository_name = "rules_rust_bindgen",
36    tags = ["manual"],
37)
38
39alias(
40    name = "bindgen",
41    actual = "//bindgen/3rdparty/crates:bindgen__bindgen",
42    tags = ["manual"],
43    visibility = ["//visibility:public"],
44)
45
46bzl_library(
47    name = "bzl_lib",
48    srcs = [
49        "//bindgen/3rdparty/crates:crates.bzl",
50        "//bindgen/3rdparty/crates:defs.bzl",
51    ],
52    visibility = ["//bindgen:__pkg__"],
53)