xref: /aosp_15_r20/external/bazelbuild-rules_rust/bindgen/3rdparty/BUILD.bindgen-cli.bazel (revision d4726bddaa87cc4778e7472feed243fa4b6c267f)
1load("@rules_rust//bindgen:repositories.bzl", "BINDGEN_VERSION")
2load("@rules_rust//rust:defs.bzl", "rust_binary")
3
4package(default_visibility = ["//visibility:public"])
5
6rust_binary(
7    name = "bindgen-cli",
8    srcs = glob(["**/*.rs"]),
9    compile_data = glob(
10        include = ["**"],
11        exclude = [
12            "**/* *",
13            "BUILD",
14            "BUILD.bazel",
15            "WORKSPACE",
16            "WORKSPACE.bazel",
17        ],
18    ),
19    crate_features = [
20        "runtime",
21    ],
22    crate_root = "main.rs",
23    edition = "2018",
24    rustc_flags = ["--cap-lints=allow"],
25    tags = [
26        "cargo-bazel",
27        "crate-name=bindgen-cli",
28        "manual",
29        "noclippy",
30        "norustfmt",
31    ],
32    version = BINDGEN_VERSION,
33    # This list is produced by adding the contents of https://github.com/rust-lang/rust-bindgen/blob/main/bindgen-cli/Cargo.toml
34    # to `@rules_rust//bindgen/3rdparty:crates_vendor`, rendering dependencies, and updating the deps
35    deps = [
36        "@rules_rust_bindgen__bindgen-{}//:bindgen".format(BINDGEN_VERSION),
37        "@rules_rust_bindgen__clap-4.3.3//:clap",
38        "@rules_rust_bindgen__clap_complete-4.3.1//:clap_complete",
39        "@rules_rust_bindgen__env_logger-0.10.0//:env_logger",
40        "@rules_rust_bindgen__log-0.4.19//:log",
41        "@rules_rust_bindgen__shlex-1.1.0//:shlex",
42    ],
43)
44