Skip to content

Before we setup a project, there are some tools you’ll need to have installed to build and upload vexide projects. Have a command-line of your choice ready, since we’ll be running some terminal commands.

Tooling

Before we start, make sure you have rustc and cargo installed on your machine. You can get that here from the official Rust website.

vexide relies on some features that are only availble in Rust’s nightly release channel, so you’ll need to switch to using nightly:

rustup toolchain install nightly
rustup default nightly

We also need some additional build tooling in order to properly build/upload to the V5’s platform target. You can install those components with the following terminal commands:

rustup component add rust-src llvm-tools
cargo install cargo-pros cargo-binutils

At this time of this tutorial being written, vexide’s tooling relies on the PROS CLI for uploading binaries. You’ll need that installed on your system and in PATH in order to upload to the brain.

Setting up a Project

To make a new project, we recommend using vexide-template, which provides a basic no_std Rust project with vexide’s stuff setup for you. If you have git, then you can simply clone the repo from a command line:

git clone https://github.com/vexide/vexide-template

If you don’t have git, you can download the project as a zip archive using this link.

This will leave you with a folder containing a barebones vexide project. Open that folder in an editor of your choice (if you aren’t sure what to use, it’s hard to go wrong with VSCode).

vexide-template folder structure

If you’ve worked in a rust project before, this folder structure should be somewhat familiar to you. If not, that’s okay too! There are two files of relevance we’ll worry about right now:

  • The contents of src contain your project’s actual source code. All of the program you will write will be in this folder. In this case main.rs is your program’s main source file.
  • Cargo.toml contains your project’s package information, including its dependencies.