Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Sep 24, 2025. It is now read-only.
This repository was archived by the owner on Sep 24, 2025. It is now read-only.

Feature Request: Add "tools" to CratesSettings #486

@alealv

Description

@alealv

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions