#riot #riot-os #laze


Placeholder for a crate from the riot-rs project

1 unstable release

0.0.0 Oct 1, 2022

Used in riot-sys

Apache-2.0 OR MIT


Build Status


Rust & RIOT OS combined for ergonomic embedded development

This is an experimental project trying to provide a nice base OS for embedded development on low-end IoT devices (with some kilobytes of RAM/flash, think Cortex-M). It combines the awesome Rust embedded ecosystem with RIOT OS.

This is highly experimental. Expect heavy changes and breakage!

If you're looking for a more production ready way of writing RIOT applications in Rust, check out riot-wrappers.

Supported hardware

This currently only supports the Nordic nrf52840dk.


  • improve RIOT OS using the merits of Rust.
  • provide a "rusty" development workflow (e.g., using cargo / crates.io)
  • provide a nice Rust API, framework and collection of crates suitable for embedded development
  • rewrite parts of RIOT in Rust to improve robustness and maintainability


This project currently allows to build a RIOT application with an embedded Rust based rt+linking. In addition, it provides a Rust rewrite of RIOT's "core" module, providing API compatible implementations of RIOT's scheduler, mutexes, thread flags, msg and mbox. riot-wrappers are integrated for developing applications using Rust, though this has not been used / tested much.


Assuming you have a Nordic nrf52840dk connected, this should get you somewhere:


1.install needed system dependencies. On Ubuntu, this should be sufficient:

    apt-get install build-essential curl git python3 pkg-config \
               libssl-dev llvm-dev cmake libclang-dev gcc-arm-none-eabi \
               clang libnewlib-nano-arm-none-eabi unzip lld ninja-build
  1. install rustup

  2. install laze: cargo install laze

  3. clone this repository and cd into it

  4. set up RIOT-rs toolchain

     laze task install-toolchain
     laze task install-c2rust
     laze task clone-riot

Flash some example

  1. Compile and flash the bottles example

    laze -C examples/bottles task -b nrf52840dk flash

  2. in another window, run a terminal program of your choice to watch the nrf52840dk's serial output

Building RIOT C applications with RIOT-rs

It is possible to build any RIOT application using RIOT-rs and its core implementation, using examples/riot-app:

laze -Cexamples/riot-app task -b nrf52840dk -a riot-app -DRIOT_APP=foo/bar flash

See the riot-app docs for more information.

More information

Please look here for more usage information.

Minimum Supported Rust Version (MSRV)

RIOT-rs makes heavy use of Rust unstable features. For the time being, it is recommended to use a current nightly.

RIOT-rs is licensed under either of

at your option.

RIOT-rs links with many components of RIOT OS, which is licenced under the terms of LGPLv2.1.

Copyright (C) 2020 Freie Universität Berlin, Inria, Kaspar Schleiser


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

No runtime deps