Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Add "tools" to CratesSettings #486

Open
alealv opened this issue May 20, 2022 · 1 comment
Open

Feature Request: Add "tools" to CratesSettings #486

alealv opened this issue May 20, 2022 · 1 comment

Comments

@alealv
Copy link
Contributor

alealv commented May 20, 2022

It would be handy to have tools argument in order not to generate a custom cargo_build_script

As an example, I need the following to build bitar just because I cannot fill the tools section.

# To be included as additional build script in `bitar`
load(
    "@rules_rust//cargo:cargo_build_script.bzl",
    "cargo_build_script",
)

cargo_build_script(
    name = "bitar_build_script",
    srcs = glob(["**/*.rs"]),
    build_script_env = {"PROTOC": "$(execpath @prx//:protoc)"},
    crate_features = [
        "brotli",
        "compress",
    ],
    crate_root = "build.rs",
    data = glob(["proto/**/*.proto"]),
    edition = "2018",
    rustc_flags = ["--cap-lints=allow"],
    tools = ["@com_google_protobuf//:protoc"],
    version = "0.9.0",
    visibility = ["//visibility:private"],
    deps = ["@raze__prost_build__0_8_0//:prost_build"],
)

This is needed because of bazelbuild/rules_rust#884 (comment)

@redshirtrob
Copy link

It seems like this should be closed since it was solved with #487.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants