Before you start programming, you’ll need to install some tools in order to build and upload your code. Get a command-line of your choice ready, since we’ll be running some terminal commands.
If you’re on Windows and prefer to follow along with a video tutorial, we have one of those too!
Installing Rust
In order to use vexide, you’ll need a Rust toolchain (cargo, rustc, etc…) installed on your computer. To install Rust on your system, follow the instructions here. If you use a Windows computer, the installer may also prompt you to install Visual Studio Build Tools.
Tooling
vexide uses on some unstable features that are currently only available in Rust’s nightly release channel, so you’ll need to switch to that:
rustup default nightly
We also need some additional tools to help us properly build/upload to VEX brains. You can install those components with the following terminal commands:
rustup component add rust-srccargo install cargo-v5
Setting up a Project
To make a new vexide project, we’ll use the cargo v5 new <NAME> command. This will create a project in the current directory containing a bare-bones template that we can start out with.
cargo v5 new my-project
After running this, you should have a new folder named my-project (or whatever you named your project). Open that folder in a code editor of your choice. If you don’t have a code editor, we recommend starting with Visual Studio Code or Zed.

If you’ve worked in a rust project before, this file structure should be somewhat familiar to you.
my_project
.cargo
config.toml
- .github
workflows
- rust.yml
src
- main.rs The entrypoint file of your program’s source code.
- .envrc
- .gitignore
- Cargo.lock
- Cargo.toml Your project’s package information, including its dependencies.
- README.md
- flake.nix
- rust-toolchain.toml
If you don’t recognize any of this, that’s okay too! There are two files of relevance we’ll worry about right now:
- The
Cargo.tomlfile contains metadata and configuration about your project’s package. This includes your dependencies, or external libraries that you may wish to use later. This is also where you can configure your project’s name, description, and upload slot. - Inside of the
srcfolder is your project’s source code. That’s where the actual code for your robot goes. Everything in that folder will eventually be imported bymain.rs, which contains the entrypoint of your code — themainfunction. We’ll look at that on the next page.
Most of the other files in the template are configuration files that tell Rust how to build projects for the V5 Brain. There’s also a set of GitHub actions for testing your project when you push to GitHub and a flake for NixOS users.