Crate vexide

source ·
Expand description

§vexide

Open-source Rust runtime for VEX V5 robots. vexide provides a no_std Rust runtime, async executor, device API, and more for the VEX V5 brain!

vexide is the successor to pros-rs which are a set of unmaintained API using bindings over PROS.

§Getting Started

If you’re just getting started, we recommend going through our docs, which provide step-by-step instructions for setting up a development environment with vexide-template.

§Project Structure

The vexide runtime is split into 7 subcrates. The one you’re looking at right now re-exports each of these crates into a single package. You can view the respective docs for each of them below:

  • vexide-core provides lowlevel core functionality for programs, such as allocators, synchronization primitives, serial printing, I/O and timers.
  • vexide-devices contains all device-related bindings for things like motors and sensors.
  • vexide-async implements our cooperative async runtime as well as several important async futures.
  • vexide-startup contains bare-metal startup code required to get freestanding user programs running on the Brain.
  • vexide-panic contains our panic handler.
  • vexide-graphics implements graphics drivers for some popular embedded Rust graphics libraries like [Slint] and [embedded-graphics].
  • vexide-macro contains the source code for the #[vexide::main] proc-macro.

§Usage

In order to get a program running, use the #[vexide::main] attribute on your main function.

use vexide::prelude::*;
#[vexide::main]
async fn main() {
    println!("Hello, world!");
}

Check out our docs for more in-depth usage guides.

Re-exports§

Modules§

  • Commonly used features of vexide. This module is meant to be glob imported.

Attribute Macros§

  • Marks a function as the entrypoint for a vexide program. When the program is started, the main function will be called with a single argument of type Peripherals which allows access to device peripherals like motors, sensors, and the display.