Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.
/ rust-plugin Public archive

A proto WASM plugin for Rust.

License

Notifications You must be signed in to change notification settings

moonrepo/rust-plugin

Repository files navigation

Rust plugin

Rust WASM plugin for proto.

proto install rust

Caveats

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:

  • Rust and Cargo must be pre-installed on your system.
  • The ~/.cargo/bin directory must be in your PATH.
  • 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.

Contributing

Build the plugin:

cargo build --target wasm32-wasi

Test the plugin by running proto commands. Requires proto >= v0.14.

proto install rust-test
proto list-remote rust-test