a framework for building FRC robots in Rust
Find a file
te c8e21eae76
feat: add confetti setup command to install WPILib + toolchain (#5)
* wip: add `confetti setup` command to download WPILib (still needs to
install)

* refactor: rename subcommand to `install`

* feat: add command to download toolchain archive

* feat: extract toolchain to ~/.confetti

* feat: set toolchain installation in cargo config

* perf: use steady tick for progress spinners

* fix: add case for when target.arm-unknown-linux-gnueabi is unset

* feat: set toolchain up locally by default

* fix: make toml setup actually work

* docs: better description

* feat: add note to install toolchain on failed build

* refactor: rename installer.rs -> toolchain.rs and clean up code

* fix: handle subdirectories in zip file properly

* fix: open cargo config file with read permission

* style: fix deepsource issues
2026-01-28 18:48:30 -05:00
confetti feat: implement REV SPARK CAN (#1) 2026-01-27 17:57:47 -05:00
confetti-cli feat: add confetti setup command to install WPILib + toolchain (#5) 2026-01-28 18:48:30 -05:00
examples wip(can): update other code to match api changes 2026-01-25 16:53:29 -05:00
.gitignore chore: initial commit 2026-01-22 12:06:08 -05:00
Cargo.lock feat: add confetti setup command to install WPILib + toolchain (#5) 2026-01-28 18:48:30 -05:00
Cargo.toml fix: make the cli and library crates actually function 2026-01-25 23:50:26 -05:00
LICENSE add LICENSE 2026-01-25 16:54:42 -05:00
README.md docs: add a little emoji to readme for da funsies (#4) 2026-01-27 18:00:28 -05:00

confetti 🎉

a framework for building FRC robots in Rust

built on guineawheek/wpihal-rs.

contributing

help is more than welcome! even if you're not sure what you can contribute, please let me know or send me an email (my email is on my profile).

if you're familiar with how some of the low-level stuff works, please reach out! i'm learning this as i go, so that would be extremely helpful for me

even if you just have complaints about the API, i'd love to hear em. i'm far from a rust professional

prerequisites

  1. you need to have WPILib installed. choose "everything" (NOT "tools only").
  2. download the proper ARM FRC toolchain for your platform from wpilibsuite/opensdk. you're looking for something like "cortexa9_vfpv3-roborio-academic-2025-YOUR-SYSTEM-TRIPLE-Toolchain-12.1.0.tgz". as of right now, the v2025-2 toolchain is the latest and does compile.
  3. set the arm-frc202X-linux-gnueabi-gcc as the linker for the arm-unknown-linux-gnueabi target in ~/.cargo/config.toml file. for example, on my computer:
[target.arm-unknown-linux-gnueabi]
linker = "/Users/te/roborio-toolchain/bin/arm-frc2025-linux-gnueabi-gcc"
  1. now, when you build, ensure that you use --target arm-unknown-linux-gnueabi, e.g. cargo build --release --target arm-unknown-linux-gnueabi

example

use confetti::prelude::*;

struct MyRobot {
    drivetrain: DifferentialDrive,
}

impl Robot for MyRobot {
    fn teleop_periodic(&mut self) {
        self.drivetrain.arcade_drive(0.5, 0.25);
    }
}

fn main() -> anyhow::Result<()> {
    let left = MotorGroup::from_motors(vec![SparkMAX::new(0), SparkMAX::new(1)]);
    let right = MotorGroup::from_motors(vec![SparkMAX::new(2), SparkMAX::new(3)]);

    let drivetrain = DifferentialDriveBuilder::default()
        .left_motor(left)
        .right_motor(right)
        .build()
        .unwrap();

    drivetrain.arcade_drive(0.65, 0.2);

    let bot = MyRobot { drivetrain };

    run(bot)
}

goals

WILL NOT abide by the WPILIB API

there are a lot of things they do that would be bizarre at best to do in Rust (from my understanding). i also don't like it that much anyway

WILL go for feature parity

unfortunately, my team has limited time, people, and resources, so this is largely a personal project and there is very limited hardware available for me to test. implementing hardware is something that i will likely have to rely on others for

WILL go for ease-of-use

i want this library to be approachable for beginner Rust programmers, so i will try hard to make things make sense.

roadmap

  • get robot loops to work*
  • implement revlib
  • implement command-based style framework
  • implement wpimath (sigh)
  • get CLI in order
    • deploy*
    • project init

*untested. my team is not particularly rich in money, resources, or time, so getting a hold of a robot that i can test on is difficult, to say the least