Skip to content

Getting Started with Rust

David Beechey edited this page Oct 18, 2024 · 1 revision

Installation

Installing Rust

Visit https://www.rust-lang.org/tools/install for the install instructions for Rust.

Linux & macOS

On Linux, run this command:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Windows

On Windows, download and install the rustup-init.exe file.

Installing probe-rs

probe-rs is used to flash Rust code to the STM microcontrollers. Visit https://probe.rs/docs/getting-started/installation/ for the install instructions for probe-rs.

Linux & macOS

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/probe-rs/probe-rs/releases/latest/download/probe-rs-tools-installer.sh | sh

Windows

Run the following in PowerShell:

irm https://github.com/probe-rs/probe-rs/releases/latest/download/probe-rs-tools-installer.ps1 | iex

You may also need to install Zadig, which is used to select "WinUSB" as the driver for your STM board if you face issues with the board not being detected. (See here.)

Embassy

We use Embassy in our codebase, which is a "next-generation framework for embedded applications". It abstracts away our hardware and exposes it with a nice API. You can learn more about Embassy on this Wiki page.