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.

If you're on Windows and prefer to follow along with a video tutorial, we have one of those too!

Tooling

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

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 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-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 barebones template that we can start with.

cargo v5 new my-project

This will leave you with a folder named my-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 project 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.

rocketship with ferris on it