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