Skip to main content
Version: 2.18 (deprecated)

rust


Options for Rust support.

Backend: pants.backend.experimental.rust

Config section: [rust]

Basic options

rustup_search_paths

--rust-rustup-search-paths="['<str>', '<str>', ...]"
PANTS_RUST_RUSTUP_SEARCH_PATHS
pants.toml
[rust]
rustup_search_paths = [
'<str>',
'<str>',
...,
]
default:
[
  "<PATH>"
]

A list of paths to search for Rustup.

Specify absolute paths to directories with the rustup binary, e.g. /usr/bin. Earlier entries will be searched first. The special string '<PATH>' will expand to the contents of the PATH env var.

toolchain

--rust-toolchain=<str>
PANTS_RUST_TOOLCHAIN
pants.toml
[rust]
toolchain = <str>
default: stable

Name of a Rust toolchain to use for all builds. The toolchain name will be provided to Rustup to find the Toolchain.

Advanced options

None

Deprecated options

None

None