Migrated to a new repository: https://github.com/moonrepo/tools
proto install rust
This plugin is built-in to proto, but if you want to override it with an explicit version, add the following to .prototools
.
[plugins]
rust = "source:https://github.com/moonrepo/rust-plugin/releases/download/vX.Y.Z/rust_plugin.wasm"
Rust plugin does not support configuration.
Rust plugin does not support hooks.
If you're familiar with Rust, you most likely use rustup, a Rust specific toolchain manager. This overlaps heavily with how proto works, so instead of proto reinventing the wheel here, we simply call rustup
under the hood. Because of this, be aware of the following when using Rust in proto:
- The
~/.cargo/bin
directory must be in yourPATH
. - We don't install Rust to
~/.proto/tools/rust
but instead reference~/.rustup/toolchains
. - We don't create shims for
cargo
,rustup
, etc.
Since we don't create shims for cargo
, rustup
, etc, we can't detect Rust versions at runtime. However, rustup
supports this through the
rust-toolchain.toml
file. We suggest using this file.
Build the plugin:
cargo build --target wasm32-wasi
Test the plugin by running proto
commands.
proto install rust-test
proto list-remote rust-test