Defined Type: rustup::target
- Defined in:
- manifests/target.pp
Summary
Install a target for a toolchainOverview
You can name this two ways to automatically set the parameters:
* `"$rustup: $target $toolchain"`: install `$target` for `$toolchain` for
the `rustup` resource named `$rustup` (normally the username). For
example, `'daniel: x86_64-unknown-linux-gnu nightly'`.
* `"$rustup: $target"`: install `$target` for the default toolchain for
the `rustup` resource named `$rustup` (normally the username). For
example: `'daniel: stable'`.
You may use the string ‘’default’‘ as the target to indicate the target that corresponds to the current host.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'manifests/target.pp', line 27
define rustup::target (
Enum[present, absent] $ensure = present,
String[1] $rustup = $name.split(': ')[0],
String[1] $target = $name.split(': ')[1].split(' ')[0],
Optional[String[1]] $toolchain = $name.split(': ')[1].split(' ')[1],
) {
Rustup_internal <| title == $rustup |> {
targets +> [{
ensure => $ensure,
name => $target,
toolchain => $toolchain,
}],
}
}
|