Skip to content

vexide 0.8.0 Migration Guide


vexide v0.8 is a new version of the runtime including improvements such as: support for the Rust Standard Library, new async runtime APIs, support for encoders with custom resolutions, the option to use the official VEX SDK, and various bug fixes. While we have aimed to minimize breaking changes, you will need to update your existing projects to make them compatible with this new release.

Automatic Upgrade Tool

Well, this doesn’t exist yet. It would be pretty convenient though.

If you’d like to upgrade a project from v0.7 to v0.8, you can use our automatic upgrade tool to do much of the hard part for you:

cargo v5 upgrade

This will handle updating vexide, enabling the Rust Standard Library, and updating your project’s Cargo configuration. However, it won’t handle any changes to vexide’s API, so if you encounter any build errors after the update, consult the API Changes section.

You’ll need to have the latest version of cargo-v5 installed to use this command, so make sure to update it beforehand. We also strongly suggest testing the upgrade on a separate branch, then merging it once you’ve reviewed the changes to your code and verified that they work.

Even if you run the upgrade tool with no complications, we still recommend reading through all of the Breaking Changes included in v0.8 to get a good idea of what’s changed and make sure the upgrade tool didn’t miss anything.

Manual Upgrade Guide

Here’s a comprehensive guide on upgrading to vexide v0.8 from v0.7. Apart from the API Changes, most of these differences can be handled by our Automatic Upgrade Tool.

If you’d rather start a new project than upgrade your current one, check out our updated template project. (Clicking “Use this template” will use the stable version, but you can still download the zip file or clone the pre-release branch.)

Update cargo-v5

Install the pre-release of cargo-v5.

cargo install --git "https://github.com/vexide/cargo-v5.git" --branch upstreamed-target

Update Rust

Update your rust-toolchain.toml file to install a newer version of Rust.

rust-toolchain.toml
[toolchain]channel = "nightly-2025-09-26"channel = "nightly"components = ["rust-src"]

Update vexide

To use vexide v0.8, you’ll need to update it in your dependencies table, then choose which SDKs you’d like to enable. Use the configuration below to keep your project’s existing behavior.

Cargo.toml
{...}[package]name = "my-vexide-project"version = "0.1.0"edition = "2024"[package.metadata.v5]upload-strategy = "differential"slot = 1icon = "cool-x"compress = true
[dependencies]vexide = "0.7.0"[dependencies.vexide]version = "0.8.0-alpha.2"features = ["full", "vex-sdk-jumptable", "vex-sdk-mock"]

If you’re updating a library that uses vexide, don’t enable full or any of the vex-sdk-* features.
Please read the vexide features guide for more information.

Enable Standard Library Support

In vexide v0.8, projects use Rust’s new builtin support for VEX V5 devices. As a result, you may now use the comprehensive Rust Standard Library (std) in your vexide projects! Enable it by taking the following steps:

Update .cargo/config.toml to use Rust’s builtin VEX V5 support and enable the standard library.

.cargo/config.toml
[build]target = "./armv7a-vex-v5.json"[unstable]build-std = ["std", "panic_abort"]build-std = ["core", "compiler_builtins", "alloc"]build-std-features = ["compiler-builtins-mem"]

Delete the old armv7a-vex-v5.json target file.

armv7a-vex-v5.json
{    "cpu": "cortex-a9",    "arch": "arm",    "abi": "eabihf",    // ...etc...}

Update your project’s source code to allow importing from the standard library.

src/main.rs
#![no_main]#![no_std]extern crate alloc;use vexide::prelude::*;#[vexide::main]async fn main(peripherals: Peripherals) {    println!("Hello, world!");}

Enable vexide’s Custom Memory Layout

In order to support features like differential uploading and async task-locals, vexide v0.8 requires all projects to enable its custom memory layout in the Cargo config file:

.config/cargo.toml
[target.'cfg(target_os = "vexos")']rustflags = ["-Clink-arg=-Tvexide.ld"][unstable]build-std = ["std", "panic_abort"]build-std-features = ["compiler-builtins-mem"]

API Changes

We haven’t completely updated this yet, so check out the vexide changelog if you think anything’s missing.

Position Arithmetic

Position structs are now internally represented as floating point values.

let pos1 = Position::from_degrees(90.0);let pos2 = pos1 / 2;let pos3 = pos1 * 2;let pos2 = pos1 / 2.0;let pos3 = pos1 * 2.0;

ADI Encoder Ticks

The AdiEncoder struct now requires you to specify a custom encoder Ticks Per Revolution value. To keep the old behavior, use AdiOpticalEncoder.

let encoder = AdiEncoder::new(peripherals.adi_a, peripherals.adi_b);let encoder = AdiOpticalEncoder::new(peripherals.adi_a, peripherals.adi_b);

Gyroscope Yaw Format

The AdiGyroscope struct now returns its yaw in degrees.

let gyro = AdiGyroscope::new(peripherals.adi_a);let yaw_pos = gyro.yaw()?;let yaw_pos = Position::from_degrees(gyro.yaw()?);

Rotation Sensor Calculation Interval

The function for changing the calculation interval of a RotationSensor was renamed from set_computation_interval to set_data_interval.

let mut sensor = RotationSensor::new(peripherals.port_1, Direction::Forward);let interval = Duration::from_millis(10);sensor.set_computation_interval(interval)?;sensor.set_data_interval(interval)?;

Buffer stride removed

The Display::draw_buffer function no longer takes a stride argument.

let buf: &[u32] = [    0, 0, 0, 0, // row 1    // ...etc...];let region = Rect::new([1, 1], [4, 4]);let width = 1 + region.end.x - region.start.x;display.draw_buffer(region, buf, width);display.draw_buffer(region, buf);

Manual usage of startup function

This is an advanced feature and it is unlikely your project is affected. If you use the #[vexide::main] attribute, this change does not affect your project.

The vexide::startup::startup() function no longer handles printing vexide’s banner message.

If you are manually calling vexide::startup::startup(), you will need to explicitly print vexide’s banner to keep the previous behavior.

unsafe {    vexide::startup::startup::<true>();    vexide::startup::startup();    vexide::startup::banner::print();}