21 releases (9 breaking)

0.9.0 Apr 5, 2024
0.8.0 Mar 6, 2024
0.7.0 Jan 22, 2024
0.3.0 Dec 24, 2023
0.0.5 May 11, 2023

#155 in Operating systems

Download history 10/week @ 2023-12-22 12/week @ 2023-12-29 13/week @ 2024-01-05 14/week @ 2024-01-12 16/week @ 2024-01-19 297/week @ 2024-02-23 201/week @ 2024-03-01 63/week @ 2024-03-08 69/week @ 2024-03-15 6/week @ 2024-03-22 21/week @ 2024-03-29 167/week @ 2024-04-05

281 downloads per month
Used in libghost

MIT license

3.5MB
2.5K SLoC

Pros-rs

Work in progress opinionated Rust bindings for the PROS library and kernel.

This project is still early in development. Make sure to check out the todo list (TODO.md)

Usage

Compiling

The only dependency of pros-rs outside of Rust is The Arm Gnu Toolchain (arm-none-eabi-gcc).

Read the installation guide for your OS to see how to get things set up.

Windows

Steps:

  1. Run The Arm Gnu Toolchain here
  2. Install the pros cli, instructions are here
  3. Install cargo pros with cargo install cargo-pros

To compile the project just run cargo pros build.

Linux

The steps for getting pros-rs compiling are slightly different based on if you use Nix or not.

With Nix

The Nix flake contains the Arm GNU Toolchain, cargo pros, and pros-cli.

There is a .envrc file included for Nix + Direnv users.

Without Nix

Install arm-none-eabi-gcc and pros-cli from your package manager of choice. Cargo pros can be installed with cargo install cargo-pros.

MacOS

This project depends on the Xcode Command Line Tools. Chances are that if you develop on MacOS you have them already, but if not you can install them with xcode-select --install.

Most of the other dependencies can easily be installed with Homebrew.

Install the Arm GNU Toolchain with brew install osx-cross/arm/arm-gcc-bin.

Install pros-cli with brew install purduesigbots/pros/pros-cli.

And you are done! Compile the project with cargo build.

Compiling for WASM

To build projects in this repository for WebAssembly, run cargo pros build -s This will automatically pass all of the correct arguments to cargo.

If for some reason you want to do it manually, this is the command: cargo build --target wasm32-unknown-unknown -Zbuild-std=std,panic_abort.

The extra build-std argument is neccesary because this repository's .cargo/config.toml enables build-std but only for core, alloc, and compiler_builtins. WebAssembly does come with std but there is currently no way to conditionally enable build-std.

Dependencies

~0–9MB
~53K SLoC