Skip to content

not-matthias/dotbot-rust

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dotbot Rust Plugin

This is a plugin for Dotbot that handles installing Rust. It also allows the installation other rustup components, as well as other Rust software with Cargo.

Installation

Add this repository as submodule to your repository:

git submodule add https://github.com/alexcormier/dotbot-rust

Usage

Modify your install script to load this plugin, as follows:

"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -p dotbot-rust/rust.py -d "${BASEDIR}" -c "${CONFIG}" "${@}"

For an example of more advanced usage, with multiple plugins, see my dotfiles.

Configuration

Two plugins are provided: cargo and rust. Here is how to configure them.

Rust Plugin

Not yet implemented. If you notice the rust section in my dotfiles, note that it is only a draft configuration for the as of yet unimplemented plugin.

Cargo Plugin

The simplest way to install binary crates is by listing them in a cargo section in your Dotbot configuration file, as follow:

- cargo:
    - pijul
    - ripgrep

If you need to specify extra arguments to Cargo, you can instead specify a crate as a dictionary. In this case, each key is passed to cargo as a long-form argument followed by its value, if any. For example, consider the following configuration:

- cargo:
    - pijul
    - ripgrep:
        - no-default-features
        - features: pcre2

This would result in the following commands being run:

cargo install --force pijul
cargo install --force ripgrep --no-default-features --features pcre2

You will note that --force was added, to allow upgrading binaries.

Finally, when using the dictionary format, any key starting with a + is interpreted as a toolchain with which to install the crate. This means that to install ripgrep as above with the nightly toolchain (cargo +nightly install --force ripgrep --no-default-features --features pcre2), you would need a configuration like this:

- cargo:
    - ripgrep:
        - +nightly
        - no-default-features
        - features: pcre2

About

Dotbot plugin for Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%