rust_add()
def rust_add(name, version)Add the Rust toolchain to your sysroot using rustup in the spaces store.
This function creates rules to manage the rust toolchain in the spaces store.
It uses rustup_init to install a copy of cargo and the rust toolchain.
It sets up rust-analyzer VS code settings for the workspace. It also sets:
RUSTUP_HOMEto the rustup directory in the spaces storeRUST_TOOLCHAINto the version of the rust toolchain to useCARGO_HOMEto the cargo directory in the spaces store
Example:
load("//@star/packages/star/rust.star", "rust_add")
rust_add("rust", "1.80")Args
name-version-