A crab standing on a printed circuit board

Workshop: 3 days

Foundations of embedded Rust

Bookable for teams – on-site or remote

Workshop description

Book this workshop

Our mentors look forward to working with your team and unlocking new capabilities.
Get in touch
1

Rust's embedded ecosystem

Rust's embedded ecosystem is built around a set of standard APIs that let you write platform-independent code even for bare-metal development. This is possible thanks to Rust's strong and expressive type system and its package manager, Cargo, which makes it easy to add and manage dependencies on third-party libraries. In this part, you'll get an overview of the ecosystem, with a focus on the core library and the structure of Peripheral Access Crates and Hardware Abstraction Layers (HALs).

2

Tooling and documentation

There are various great tools out there that make life of an embedded Rust engineer much easier. This part covers the structure of a typical embedded Rust project, finding and adding dependencies and finding their documentation and usage examples, and optimising your code. Furthermore, you’ll work with probe-rs to load and debug your application and log over RTT and defmt.

3

A basic Rust application

With a solid grasp of the context and tools, you’re ready to write your first embedded Rust application. In this part, you’ll learn the Rust way of writing embedded applications, interacting with hardware and configuring interrupts. This part covers the hardships of sharing resources between application code and interrupt handlers, how Rust makes those explicit, and how to overcome them safely.

4

Writing cross-platform device drivers

API standards in Rust's embedded ecosystem enable writing platform-independent code, and making your device drivers cross-platform is just a matter of adhering to them. This part introduces Rust's trait and generics mechanism, allowing you to write your first sensor driver in Rust that can be used from bare-metal all the way to embedded linux, whatever the hardware platform.

5

An async Rust application

One of Rust's killer features for embedded development is language support for asynchronous multitasking. This part introduces how Rust transforms async code into state machines that can be run by embedded-specific executors such as embassy-executor. You’ll learn how a typical embassy-based application is structured, how to interact with hardware asynchronously, and how to configure interrupts and background tasks.

6

Rust in IoT

Communicating with systems external to the device is an essential requirement for almost every embedded system. In this part, you’ll learn how to leverage Rust to set up robust, re-usable, secure, and maintainable communications, as well as share code between device and server. You’ll make your device speak MQTT to exchange custom-defined, encrypted messages with a remote server.

7

A Zephyr application written in Rust

Sometimes, you’re in a situation where choices have been made for you. With the rising popularity of Zephyr RTOS you may well find yourself having to write your code as a Zephyr application. In this part, you’ll learn how to write your Zephyr applications in Rust. This part covers the current state of Rust support in Zephyr, and interacting with various OS APIs.

8

Rust in safety-critical systems

Picking a memory safe programming language when creating safety-critical systems seems a no-brainer, but with the embedded world still relying heavily on older programming languages, deviating from the standard has implications. This part covers the current state of art when it comes to using Rust to write safety-critical code, and what to consider in doing so. In addition, this part covers writing embedded applications with real-time requirements using the RTIC concurrency framework.

Your mentor

Henk Oordt

Senior Software Engineering Consultant

Henk is a long time Rust engineer with a diverse background in developing Rust applications and others the trade, and has been writing embedded Rust since the early days. As a member of Rust's embedded working group, Henk works on creating educational content on embedded Rust, such as Rust's Discovery book.

Book this workshop

Our mentors look forward to working with your team and unlocking new capabilities.
Your message is being sent…

Unable to send message.

Please try again later or contact us at info@mainmatter.com

Thank you!

We will be in touch soon.

Not the right workshop for you?

Take a look at our wide range of workshops to take your team to the next level
Our workshops

Stay up to date on Rust

Subscribe to our newsletter and stay up to date about the latest events, workshops, and other news around Rust.