fork/rules_rust

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

UebelAndreMoved rust extension rules into a separate `rules_rust_ext` workspace. (#3007)2bad96d9

main
1.4 KiB44 linesraw
1load("@rules_rust//rust:defs.bzl", "rust_binary")
2load("@rules_rust_bindgen//:repositories.bzl", "BINDGEN_VERSION")
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_deps__bindgen-{}//:bindgen".format(BINDGEN_VERSION),
37        "@rules_rust_bindgen_deps__clap-4.5.17//:clap",
38        "@rules_rust_bindgen_deps__clap_complete-4.5.26//:clap_complete",
39        "@rules_rust_bindgen_deps__env_logger-0.10.2//:env_logger",
40        "@rules_rust_bindgen_deps__log-0.4.22//:log",
41        "@rules_rust_bindgen_deps__proc-macro2-1.0.86//:proc_macro2",
42        "@rules_rust_bindgen_deps__shlex-1.3.0//:shlex",
43    ],
44)