Forge Home


Manage Rust with rustup


139 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.0 (latest)
released Sep 17th 2022
This version is compatible with:
  • Puppet Enterprise 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x
  • Puppet >= 6.21.0 < 8.0.0
  • , , , , , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'dp-rustup', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add dp-rustup
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install dp-rustup --version 0.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



dp/rustup — version 0.1.0 Sep 17th 2022

Manage Rust with rustup

This manages Rust installations with the rustup tool. There are two ways to use it:

  • With standard, per-user installations. Each user has their own installation in their home directory that is entirely separate from every other installation.
  • With a global installation. Users are able to access shared toolchains and targets, but will not be able to change any of them. Users can still use cargo install, but the installed tools will only be accessible to themselves.


Per user installation

rustup { 'user':
  purge_toolchains => true,
  purge_targets    => true,
rustup::toolchain { 'user: stable': }
rustup::target { 'user: default': }
rustup::toolchain { 'user: nightly': }
rustup::target { 'user: default nightly': }
rustup::target { 'user: x86_64-unknown-linux-musl nightly': }

Global installation

class { 'rustup::global':
  purge_toolchains => true,
  purge_targets    => true,
rustup::global::toolchain { 'stable': }
rustup::global::target { 'default': }
rustup::global::toolchain { 'nightly': }
rustup::global::target { 'default nightly': }
rustup::global::target { 'x86_64-unknown-linux-musl nightly': }


  • This does not allow management of components.
  • This does not allow management of profiles.
  • This will not be able to install non-host toolchains in the future.
  • This does not support Windows.


There is specific documentation for individual parameters in That file is generated with:

pdk bundle exec puppet strings generate --format markdown