Giter Site home page Giter Site logo

rust-wpilib's Introduction

Rust WPILib Build Status

rust-wpilib is an equivalent to WPILib, rewritten in Rust. The goal of this project is to create a lightweight alternative to WPILib for FIRST Robotics Competition teams who would prefer to use the language for its safety guarantees.

Getting started

This repository is designed to be compiled for a RoboRIO, the processor used in the FIRST Robotics Competition. To cross compile for RoboRIO, you have to do a few things:

  1. Install Rustup to help manage Rust toolchains.

  2. Run rustup target add arm-unknown-linux-gnueabi to install the Rust stdlib for ARM-based Linux.

  3. Install some variant of arm-linux-gnueabi-gcc. For example, the official FRC toolchain (arm-frc-linux-gnueabi-gcc) is available here, or you can install a generic toolchain with your package manager of choice (sudo apt-get install gcc-arm-linux-gnueabi on Ubuntu).

  4. Edit your ~/.cargo/config file with the following information:

    [target.arm-unknown-linux-gnueabi]
    linker = "<path-to-arm-linux-gnueabi-gcc>"

Using this library as a dependency:

This library is not currently published on crates.io. However, you can directly declare it as a dependency:

Cargo.toml:

[dependencies]
wpilib = { git = "https://github.com/robotrs/rust-wpilib" }

Building

You can build your own project for the RoboRIO by passing --target=arm-unknown-linux-gnueabi when building.

To build this library on its own, just run cargo build --target=arm-unknown-linux-gnueabi. To make sure that everything links properly, you may also want to run cargo build --example test_robot --target=arm-unknown-linux-gnueabi.

rust-wpilib's People

Contributors

kylestach avatar ahmad-bamba avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.