@rules_rs//rs:extensions.bzl
Module Extensions
crateTag Classes
annotationA collection of extra attributes and settings for a particular crate.
| Attribute | Type | Description |
|---|---|---|
*crate | string | The name of the crate the annotation is applied to |
repositories | list of strings | A list of repository names specified from Default: [] |
additive_build_file | label | A file containing extra contents to write to the bottom of generated BUILD files. Default: None |
additive_build_file_content | string | Extra contents to write to the bottom of generated BUILD files. Default: "" |
build_script_data | list of strings | A list of labels to add to a crate's Default: [] |
build_script_data_select | dictionary: String → List of strings | A list of labels to add to a crate's Default: {} |
build_script_env | dictionary: String → String | Additional environment variables to set on a crate's Default: {} |
build_script_env_select | dictionary: String → String | Additional environment variables to set on a crate's Default: {} |
build_script_toolchains | list of labels | A list of labels to set on a crates's Default: [] |
crate_features | list of strings | A list of strings to add to a crate's Default: [] |
data | list of strings | A list of labels to add to a crate's Default: [] |
deps | list of strings | A list of labels to add to a crate's Default: [] |
gen_build_script | string | An authoritative flag to determine whether or not to produce Default: "auto" |
patch_args | list of strings | The Default: [] |
patch_tool | string | The Default: "" |
patches | list of labels | The Default: [] |
rustc_flags | list of strings | A list of strings to set on a crate's Default: [] |
strip_prefix | string | Default: "" |
workspace_cargo_toml | string | For crates from git, the ruleset assumes the (workspace) Cargo.toml is in the repo root. This attribute overrides the assumption. Default: "Cargo.toml" |
from_cargoGenerates a repo @crates from a Cargo.toml / Cargo.lock pair.
| Attribute | Type | Description |
|---|---|---|
name | name | The name of the repo to generate Default: "crates" |
cargo_toml | label | The workspace-level Cargo.toml. There can be multiple crates in the workspace. Default: None |
cargo_lock | label | Default: None |
cargo_config | label | Default: None |
use_home_cargo_credentials | boolean | If set, the ruleset will load Default: False |
*platform_triples | list of strings | The set of triples to resolve for. They must correspond to the union of any exec/target platforms that will participate in your build. |
debug | boolean | Default: False |