Add this line to your application's Gemfile:
gem 'itamae-plugin-recipe-rust'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install itamae-plugin-recipe-rust
Install Rust to /usr/local/cargo
or some shared path
# your recipe
include_recipe "rust::system"
Use this with itamae -y node.yml
rust:
# Rust install dir, optional (default: /usr/local/cargo)
cargo_home: /usr/local/cargo
# Version of Rust to install, optional (default: latest)
# version: 1.58.1
# Passed to `rustup install`, optional (This is used to install a specific version of Rust)
# rustup_install_option: "--profile minimal"
Recommend to append this to .bashrc
in your server.
export CARGO_HOME=/usr/local/rust
export PATH="${CARGO_HOME}/bin:${PATH}"
Install Rust to ~/.cargo
# your recipe
include_recipe "rust::user"
Use this with itamae -y node.yml
rust:
# User to be installed, optional (default: ENV["USER"])
user: deploy
# Rust install dir, optional (default: "/home/#{node[:rust][:user]}/.cargo" or "/Users/#{node[:rust][:user]}/.cargo" (MacOS))
# cargo_home: /home/deploy/.cargo
# Version of Rust to install, optional (default: latest)
# version: 1.58.1
# Passed to `rustup install`, optional (This is used to install a specific version of Rust)
# rustup_install_option: "--profile minimal"
This plugin can be used for mitamae too. Put this repository under ./plugins
as git submodule.
node.reverse_merge!(
rust: {
user: "deploy",
version: "1.58.1",
}
)
include_recipe "rust::user"
After checking out the repo, run bin/setup
to install dependencies. Then, run rake test
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and the created tag, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/itamae-plugins/itamae-plugin-recipe-rust.
The gem is available as open source under the terms of the MIT License.