Ready-to-use template for developing VEX V5 robots in Rust.
Seasoned vexide user? Delete README.md and update Cargo.toml as needed.
To start a project using this template, click the "Use this template" button in the upper right corner of the GitHub repository. Choose an appropriate name and clone the new repository using Git. Finally, update the package name in Cargo.toml
:
[package]
name = "my-vex-robot"
version = "0.1.0"
edition = "2021"
You can also configure your program slot and upload behavior in Cargo.toml
:
[package.metadata.v5]
slot = 1
icon = "cool-x"
compress = true
See our Building & Uploading tutorial for more information.
Follow the instructions here to install rustup
.
Run the following commands in Powershell to set up your PC for development on Windows.
-
Switch to the
nightly
rust toolchain and add therust-src
component:rustup default nightly rustup component add rust-src
-
Install cargo-v5:
cargo install cargo-v5
Follow the instructions here to install rustup
on your Mac.
Run the following commands in a terminal window to setup development with vexide.
-
Open a terminal and configure
rustup
to build for the V5's platform target: -
Switch to the
nightly
rust toolchain and add therust-src
component:rustup default nightly rustup component add rust-src
-
Install cargo-v5:
cargo install cargo-v5
The Nix flake includes a devshell with every tool you need for building and uploading vexide projects.
There is a .envrc
file for Nix + Direnv users.
Follow the instructions here to install rustup
. You may also prefer to install it from your system package manager or by other means. Instructions on that can be found here.
Run the following terminal commands to set up development on Debian or Ubuntu.
-
Switch to the
nightly
rust toolchain and add therust-src
component:rustup default nightly rustup component add rust-src
-
Install cargo-v5:
cargo install cargo-v5
Run the following terminal commands to set up your PC for development on Fedora.
-
Install Rust:
sudo dnf install rustup rustup-init -y --default-toolchain nightly
-
Close and reopen the terminal, and finish installing vexide:
rustup component add rust-src cargo install cargo-v5
Check out the documentation on the official vexide website for walkthrough-style guides and other helpful learning resources!
An API reference is also provided by docs.rs.
Use the cargo-v5 terminal utility to build and upload this vexide project.
cargo v5 build
Use a USB cable to connect to your robot brain or to your controller before using the upload
subcommand to build and upload the project. Make sure to specify a program slot.
cargo v5 upload
You can view panic messages and calls to println!()
using the terminal.
Use a USB cable to connect to your robot brain or controller, then start the terminal:
cargo v5 terminal