Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Open-source Rust runtime for VEX robots.

License

NotificationsYou must be signed in to change notification settings

vexide/vexide

Repository files navigation

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

vexide is the successor topros-rs which is a set of unmaintained APIs using bindings overPROS.

Warning

vexide is still considered experimental, but can be used today. Check out ourdocs on how to get started.

Getting Started

vexide is published oncrates.io and can be used like a normal embedded Rust crate.

If you're just getting started, we recommend going through ourdocs, which provide step-by-step instructions for setting up a development environment withvexide-template. You can also use ourexamples as a reference for your own projects.

Project Structure

The vexide runtime is a fairly standard rust monorepo split into 7 subcrates:

  • 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 ourpanic handler.
  • vexide-macro contains the source code for the#[vexide::main] proc-macro.

These subcrates are exported from a singlevexide crate intended to be used as a complete package.

Building

vexide relies on some features that are only available in Rust’s nightly release channel, so you’ll need to switch to using nightly. We also depend on therust-src component due to our embedded target requiring a build ofcore.

rustup overrideset nightlyrustup component add rust-src

This project is compiled like any other Rust project with one caveat - we have our own dedicated wrapper overcargo calledcargo-v5, which passes some additional arguments tocargo to correctly build for the platform.

You can install that tool with the following command:

cargo install cargo-v5

From there, the project can be built like any other Rust library throughcargo-v5:

cargo v5 build --release

Examples can similarly be built this way:

cargo v5 build --example basic --release

Note

If you don't want to usecargo-v5 to build your project, you can effectively do the same thing that it's doing by runningcargo build --target ./armv7a-vex-v5.json -Zbuild-std=core,alloc,compiler_builtins

Testing Your Changes

When making changes to vexide, it's a good idea to test them. The easiest way to do this is by running one of our examples.cargo-v5 can be used to upload an example by running a command like this:

cargo v5 upload --example basic --release

Depending on what you have changed, the basic example may not be the best example to test. We have many examples covering different parts of vexide, so choose the one that applies to your changes. If there isn't one, feel free to add it!


[8]ページ先頭

©2009-2025 Movatter.jp