#rustup #target #toolchain

rustup-configurator

Helper for listing and adding rustup targets and toolchains (coming)

2 releases

0.1.1 Oct 29, 2023
0.1.0 Feb 14, 2023

#289 in Configuration

Download history 10/week @ 2023-07-29 18/week @ 2023-08-05 19/week @ 2023-08-12 16/week @ 2023-08-19 11/week @ 2023-08-26 20/week @ 2023-09-02 23/week @ 2023-09-09 16/week @ 2023-09-16 9/week @ 2023-09-23 15/week @ 2023-09-30 13/week @ 2023-10-07 18/week @ 2023-10-14 17/week @ 2023-10-21 44/week @ 2023-10-28 22/week @ 2023-11-04 29/week @ 2023-11-11

114 downloads per month
Used in 2 crates (via xcframework)

MIT license

8KB
117 lines

This crate provides a simple interface to the rustup target command for listing and adding targets. It uses the target-lexicon Triple to identify targets.

use rustup_configurator::Triple;

// get a list of all targets and if they are installed
let list: Vec<(Triple, bool)> = rustup_configurator::list().unwrap();

// get all installed targets
let installed: Vec<Triple> = rustup_configurator::installed().unwrap();

// install some targets
rustup_configurator::install(&["aarch64-apple-ios".parse().unwrap()]).unwrap();

Contributions

Contributions are welcome! Please open an issue or PR on GitHub


lib.rs:

This crate provides a simple interface to the rustup target command for listing and adding targets. It uses the target-lexicon Triple to identify targets.

use rustup_configurator::Triple;

// get a list of all targets and if they are installed
let list: Vec<(Triple, bool)> = rustup_configurator::list().unwrap();

// get all installed targets
let installed: Vec<Triple> = rustup_configurator::installed().unwrap();

// install some targets
rustup_configurator::install(&["aarch64-apple-ios".parse().unwrap()]).unwrap();

Dependencies

~0.7–1.3MB
~30K SLoC