Build, upload, run, and simulate Rust projects written for VEX!
cargo-v5 is a command line tool that simplifies working with VEX projects written in Rust (with a focus on the vexide runtime).
Install via cargo binstall
Supports all platforms
cargo binstall cargo-v5Install via Homebrew
Supports macOS & Linux
brew install vexide/vexide/cargo-v5Supports macOS & Linux (probably not NixOS)
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/vexide/cargo-v5/releases/latest/download/cargo-v5-installer.sh | shSupports Windows
irm https://github.com/vexide/cargo-v5/releases/latest/download/cargo-v5-installer.ps1 | iexcargo-v5 comes with 2 optional features that enable extra functionality:
field-control: Adds a field control tui accesible throughcargo v5 field-controlorcargo v5 fc.fetch-template: With this feature enabled,cargo v5 newwill attempt to fetch the most recent upstream version of vexide-template instead of a built-in one. The command will always fall back to the built-in template.
If you wish to enable both, you can simply enable the full feature.
Tip
Pre-built versions of cargo-v5 have all optional features enabled.
cargo install cargo-v5 --features "full"cargo install cargo-v5 --features "field-control"cargo install cargo-v5Build a vexide project for the V5's platform target:
cargo v5 build --releaseUpload a vexide project over USB (you may be prompted to provide a slot number):
cargo v5 uploadView serial output from the current user program:
cargo v5 terminalUpload behavior can be configured through either your Cargo.toml file or by providing arguments to cargo-v5.
cargo-v5 will attempt to find Cargo.toml files with the following structure for providing defaults to some upload options.
[package.metadata.v5]
slot = 1
icon = "cool-x"
compress = truepackage.metadata.v5.slot(integer): Set the default program slot to upload to.package.metadata.v5.icon(string) (default"question-mark"): Set the default program icon. (seecargo v5 upload -hfor a list of icon strings)package.metadata.v5.compress(boolean) (defaulttrue): Configure if program binaries should be gzipped before uploading. It is strongly recommended to keep this at default (true), as disabling compression will greatly increase upload times.
cargo-v5 will also use your project's package.name and package.description fields for program name/description if nothing is explicitly provided.
For a full list of arguments, check
cargo v5 help
If you installed cargo-v5 using the standalone shell or PowerShell scripts above, you can remove it by running this command in your Unix shell:
rm ~/.local/bin/cargo-v5 ~/.config/cargo-v5/cargo-v5-receipt.jsonOr by running this in PowerShell:
rm ~\.local\bin\cargo-v5 "$env:LOCALAPPDATA\cargo-v5\cargo-v5-receipt.json"