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

Migrated to a new repository: https://github.com/moonrepo/tools

Rust plugin

Rust WASM plugin for proto.

Installation

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"

Configuration

Rust plugin does not support configuration.

Hooks

Rust plugin does not support hooks.

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:

  • 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.

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

About

A proto WASM plugin for Rust.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages