Skip to main content
Version: 2.23

rust_package


A Rust package as defined in https://doc.rust-lang.org/book/ch07-01-packages-and-crates.html.

Expects that there is a Cargo.toml target in its root directory

Backend: pants.backend.experimental.rust


description

str | None
default: None

A human-readable description of the target.

Use pants list --documented :: to see all targets with descriptions.

skip_rustfmt

bool
default: False
backend: pants.backend.experimental.rust

If true, don't run rustfmt on this crate.

sources

Iterable[str] | None
default: ('src/**/*.rs', 'tests/**/*.rs')

A list of files and globs that belong to this target.

Paths are relative to the BUILD file's directory. You can ignore files/globs by prefixing them with !.

Example: sources=['src/main.rs', 'src/new_*.rs', '!src/old_ignore.py']

tags

Iterable[str] | None
default: None

Arbitrary strings to describe a target.

For example, you may tag some test targets with 'integration_test' so that you could run pants --tag='integration_test' test :: to only run on targets with that tag.