Getting started

So you want to try using Rust embedded, great! To get started, there are a few tools you need to install:

  • rustup - the Rust toolchain is needed to compile Rust code.

  • probe-run - to flash the firmware on your device. If you already have other tools like OpenOCD setup, you can use that as well.

If you don’t have any supported board, don’t worry: you can also run the std on your PC.

Getting a board with examples

Running an example

First you need to clone the github repository;

git clone
cd drogue-device

You can run an example by opening a terminal and entering the following commands:

cd examples/std/pingpong
RUST_LOG=info cargo run --release

If you’re using any of the microcontroller examples:

cd examples/nrf52/microbit/jukebox
DEFMT_LOG=info cargo run --release
The DEFMT_LOG environment variable controls the example log verbosity. If not set, you will not see anything logged to the console.

Creating your own project

Found an example you like? Using the examples in tree have all the dependencies set up for you, but which dependencies should you specify when creating your own project? Since drogue-device is still using nightly rust, and still have dependencies that are not released on, we’ve prepared a mechanism for you to clone an example into its own folder.

To create a project based on one of the microbit examples, run the following command in the toplevel folder of the drogue-device repository:

cargo xtask clone examples/nrf52/microbit/jukebox $HOME/myexample

Whats next?

Congratulations, you have your first Rust async application running! Here are some alternatives on where to go from here: