Integrate Rust into existing (embedded) C applications
by Christian Meusel
This is a hands-on workshop where you will start with an existing C microcontroller application and learn how to extend it with Rust: How to integrate Rust into the build, how to add support for Rust’s runtime, how call back and forth between the languages and how to make use of its breadth ecosystem. You will be the one making these steps - but no worries, you will be guided well along the way.
The application you are dealing with is a WiFi scanner displaying nearby networks on a small display. Your task will be to get Rust in this application, add already existing code for QR code generation, and finally to display the generated codes so that you can connect to open networks with a scan from your phone.
And what works in such an environment, works well in less restricted environments too.
If you feel comfortable with C and foundational Rust, are curious about how to bring them together and are not afraid of working with a microcontroller board, this workshop is for you.
Prerequisites
- Intermediate Rust experience (you’ve built at least one small project in Rust)
- Laptop with a Rust toolchain installed (instructions follow)
- Workshop materials, sample code, and a microcontroller board will be provided
Target Audience
Developers who can write working C and Rust code and want to learn how to integrate these languages (in an embedded context).
What you’ll learn
- What is required for the Rust runtime
- How to integrate into the (CMake) build of an existing C application
- How interface Rust and C with Rust’s Foreign Function Interface (FFI)
- How to build, or better generate, FFI abstractions
- How to use static Rust containers
- How to add support for dynamic memory allocations
Christian Meusel
Hello, I’m Christian Meusel. I’m building embedded systems for 20 years and for the last 10 of them I’m helping customers to get their products into shape, certified, and shipped. In most cases, Rust is at least partly driving them. For recreational coding, I do open-source work like maintaining the serialport crate.
Get your ticket
All workshops are held on Monday May 18 starting at 10:00.
Workshop tickets are available only in combination with a conference ticket. Choose 'Conference Ticket - Individuals' or 'Conference Ticket - Employer-paid', then select 'Workshop participation'. Proceed, and in the next steps select the workshop of your preference.