Uploaded January 2026 | Updated November 2026, 12 hours ago
Rust is a modern systems programming language designed for both safety and speed. In this first episode, we explore what makes Rust unique, why it’s gaining traction across industries, and why it’s a promising option for embedded systems. From its origins as a side project in 2006 to its growth into a foundation-backed language used by companies like Microsoft, AWS, and Raspberry Pi, Rust’s history helps explain why so many developers are paying attention today.
The written guide for this episode can be found here: digikey.com/en/maker/tutorials/2026/intro-to-embedded-rust-part-1-what-is-rust
The GitHub repository containing the Docker image and example code for this series can be found here: github.com/ShawnHymel/introduction-to-embedded-rust
Unlike older languages that rely on either manual memory management (C, C++) or garbage collection (Java, Python), Rust introduces a third approach: the ownership model. This model enforces memory safety at compile time, helping to eliminate entire classes of bugs while still giving developers low-level control. Combined with features like zero-cost abstractions, predictable performance, direct hardware access, and even inline assembly support, Rust strikes a powerful balance between expressiveness and efficiency.
Of course, Rust isn’t without its challenges and limitations. The learning curve can be steep, compile times are longer than C, and the embedded ecosystem is still maturing with limited vendor support. Real-time operating systems in Rust are still emerging, and some libraries are community-driven rather than industry-backed. That said, with growing adoption, expanding hardware support, and strong community contributions, Rust is becoming an increasingly popular choice for embedded projects.
In this episode, we’ll set up a pre-configured Docker environment and walk through building a simple “Hello, world!” application in Rust. This provides the foundation for the rest of the series, where we’ll explore embedded programming on the Raspberry Pi Pico 2, cover Rust fundamentals like ownership and traits, and eventually move into advanced topics like interrupts, debugging, and asynchronous frameworks.
Links:
Getting Started with STM32 and Nucleo: youtube.com/watch?v=hyZS2p1tW-g&list=PLEBQazB0HUyRYuzfi4clXsKUSgorErmBv
Introduction to Real-Time Operating Systems (RTOS): youtube.com/watch?v=F321087yYy4&list=PLEBQazB0HUyQ4hAPU1cJED6t3DU0h34bz
Learn more:
Maker.io - digikey.com/en/maker
DigiKey’s Blog – TheCircuit digikey.com/en/blog
Connect with DigiKey on Facebook facebook.com/digikey.electronics
And follow us on X: https://x.com/digikey
Related Products:
digikey.com/en/products/detail/raspberry-pi/SC1631/24627142
digikey.com/en/products/detail/raspberry-pi/SC1632/26241102
digikey.com/en/products/detail/raspberry-pi/SC1633/25862735
digikey.com/en/products/detail/raspberry-pi/SC1634/26241087
digikey.com/en/products/detail/sparkfun-electronics/13314/6797646
digikey.com/en/products/detail/lite-on-inc/LTL-4224/217584
digikey.com/en/products/detail/stackpole-electronics-inc/CF14JT220R/1830334
digikey.com/en/products/detail/te-connectivity-alcoswitch-switches/1825910-6/1632536
digikey.com/en/products/detail/dfrobot/FIT0096/7597069
digikey.com/en/products/detail/adafruit-industries-llc/1957/6827090
digikey.com/en/products/detail/cvilux-usa/DH-20M50055/13175849
Chapters:
0:00 Intro
4:11 Syllabus
8:38 History of Rust
13:04 Memory Management Tradeoffs
20:12 Use Cases
25:02 Limitations
31:15 Installation of Docker Image
37:42 Hello World
50:45 Rustlings
54:59 Conclusion
Rust is a modern systems programming language designed for both safety and speed. In this first episode, we explore what makes Rust unique, why it’s gaining traction across industries, and why it’s a promising option for embedded systems. From its origins as a side project in 2006 to its growth into a foundation-backed language used by companies like Microsoft, AWS, and Raspberry Pi, Rust’s history helps explain why so many developers are paying attention today.
The written guide for this episode can be found here: digikey.com/en/maker/tutorials/2026/intro-to-embedded-rust-part-1-what-is-rust
The GitHub repository containing the Docker image and example code for this series can be found here: github.com/ShawnHymel/introduction-to-embedded-rust
Unlike older languages that rely on either manual memory management (C, C++) or garbage collection (Java, Python), Rust introduces a third approach: the ownership model. This model enforces memory safety at compile time, helping to eliminate entire classes of bugs while still giving developers low-level control. Combined with features like zero-cost abstractions, predictable performance, direct hardware access, and even inline assembly support, Rust strikes a powerful balance between expressiveness and efficiency.
Of course, Rust isn’t without its challenges and limitations. The learning curve can be steep, compile times are longer than C, and the embedded ecosystem is still maturing with limited vendor support. Real-time operating systems in Rust are still emerging, and some libraries are community-driven rather than industry-backed. That said, with growing adoption, expanding hardware support, and strong community contributions, Rust is becoming an increasingly popular choice for embedded projects.
In this episode, we’ll set up a pre-configured Docker environment and walk through building a simple “Hello, world!” application in Rust. This provides the foundation for the rest of the series, where we’ll explore embedded programming on the Raspberry Pi Pico 2, cover Rust fundamentals like ownership and traits, and eventually move into advanced topics like interrupts, debugging, and asynchronous frameworks.
Links:
Getting Started with STM32 and Nucleo: youtube.com/watch?v=hyZS2p1tW-g&list=PLEBQazB0HUyRYuzfi4clXsKUSgorErmBv
Introduction to Real-Time Operating Systems (RTOS): youtube.com/watch?v=F321087yYy4&list=PLEBQazB0HUyQ4hAPU1cJED6t3DU0h34bz
Learn more:
Maker.io - digikey.com/en/maker
DigiKey’s Blog – TheCircuit digikey.com/en/blog
Connect with DigiKey on Facebook facebook.com/digikey.electronics
And follow us on X: https://x.com/digikey
Related Products:
digikey.com/en/products/detail/raspberry-pi/SC1631/24627142
digikey.com/en/products/detail/raspberry-pi/SC1632/26241102
digikey.com/en/products/detail/raspberry-pi/SC1633/25862735
digikey.com/en/products/detail/raspberry-pi/SC1634/26241087
digikey.com/en/products/detail/sparkfun-electronics/13314/6797646
digikey.com/en/products/detail/lite-on-inc/LTL-4224/217584
digikey.com/en/products/detail/stackpole-electronics-inc/CF14JT220R/1830334
digikey.com/en/products/detail/te-connectivity-alcoswitch-switches/1825910-6/1632536
digikey.com/en/products/detail/dfrobot/FIT0096/7597069
digikey.com/en/products/detail/adafruit-industries-llc/1957/6827090
digikey.com/en/products/detail/cvilux-usa/DH-20M50055/13175849
Chapters:
0:00 Intro
4:11 Syllabus
8:38 History of Rust
13:04 Memory Management Tradeoffs
20:12 Use Cases
25:02 Limitations
31:15 Installation of Docker Image
37:42 Hello World
50:45 Rustlings
54:59 Conclusion
![Intro to Embedded Rust Part 9: Test-Driven Development | DigiKey
In this video, we cover test-driven development (TDD) for embedded Rust by demonstrating writing a unit test for our previous TMP102 temperature sensor driver library (crate) and a simulated I2C bus known as a “stub.”
The written guide for this episode can be found here: https://www.digikey.com/en/maker/tutorials/2026/intro-to-embedded-rust-part-9-test-driven-development
The GitHub repository containing the Docker image and example code for this series can be found here: https://github.com/ShawnHymel/introduction-to-embedded-rust
Test-driven development is a professional software methodology where you write tests before implementing functionality, helping catch bugs early and ensuring code meets requirements. While TDD is common in application development, it presents unique challenges in embedded systems where code runs on hardware and interacts with peripherals like I2C, SPI, and GPIO.
See here to learn more about Continuous Integration/Continuous Delivery (CI/CD): https://www.youtube.com/watch?v=1nxGcfIm-TU&list=PLEBQazB0HUyR00bgoctk-5uZoOrbmPASC
This tutorial demonstrates how to write unit tests for our TMP102 temperature sensor driver that run entirely on your development computer without requiring a Raspberry Pi Pico 2, sensor hardware, or any embedded target. Youll learn how to create stub implementations of embedded-hal traits, use Rusts testing framework with cargo test, and apply TDD principles to embedded driver development for reliable, maintainable code.
This hands-on embedded testing tutorial covers the complete TDD workflow and testing concepts essential for professional development. We explain the red-green-blue cycle: writing failing tests first (red phase), implementing code to make tests pass (green phase), and refactoring for quality (blue phase). We cover the three levels of testing: unit tests for individual functions, integration tests for component interaction, and system/end-to-end tests for complete applications. We also define common test substitution terminology including dummies (placeholders), fakes (working but simplified implementations), stubs (predetermined responses), spies (recording call information), and mocks (verifying correct usage). We focus on using stubs and dummies to simulate I2C communication without real hardware, enabling fast, automated testing during development.
We put these concepts into practice with a demonstration: creating a test infrastructure for the TMP102 driver library along with two unit tests. We cover how to use the #[cfg(test)] attribute to include test-only code that doesnt compile into production builds, and how to access the standard library for testing while keeping your library no_std for embedded targets.
We build an I2cStub struct that implements the embedded_hal::i2c::I2c trait with configurable responses, allowing you to set predetermined temperature values and verify driver behavior. Youll see how to write test functions with #[test] attributes, use assertions like assert_eq! to verify behavior, and run tests with cargo test command.
Related Link:
https://www.digikey.com/en/maker/tutorials/2026/intro-to-embedded-rust-part-9-test-driven-development
Links:
Getting Started with STM32 and Nucleo: https://www.youtube.com/watch?v=hyZS2p1tW-g&list=PLEBQazB0HUyRYuzfi4clXsKUSgorErmBv
Introduction to Real-Time Operating Systems (RTOS): https://www.youtube.com/watch?v=F321087yYy4&list=PLEBQazB0HUyQ4hAPU1cJED6t3DU0h34bz
Raspberry Pi Pico 2: https://www.digikey.com/en/products/detail/raspberry-pi/SC1631/24627142
Intro to CI/CD: https://www.youtube.com/watch?v=1nxGcfIm-TU&list=PLEBQazB0HUyR00bgoctk-5uZoOrbmPASC
Learn more:
Maker.io - https://www.digikey.com/en/maker
DigiKey’s Blog – TheCircuit https://www.digikey.com/en/blog
Connect with DigiKey on Facebook https://www.facebook.com/digikey.electronics/
And follow us on X: https://x.com/digikey
Product:
https://www.digikey.com/en/products/detail/raspberry-pi/SC1631/24627142
https://www.digikey.com/en/products/detail/raspberry-pi/SC1632/26241102
https://www.digikey.com/en/products/detail/raspberry-pi/SC1633/25862735
https://www.digikey.com/en/products/detail/raspberry-pi/SC1634/26241087
https://www.digikey.com/en/products/detail/sparkfun-electronics/13314/6797646
https://www.digikey.com/en/products/detail/lite-on-inc/LTL-4224/217584
https://www.digikey.com/en/products/detail/stackpole-electronics-inc/CF14JT220R/1830334
https://www.digikey.com/en/products/detail/te-connectivity-alcoswitch-switches/1825910-6/1632536
https://www.digikey.com/en/products/detail/dfrobot/FIT0096/7597069
https://www.digikey.com/en/products/detail/adafruit-industries-llc/1957/6827090
https://www.digikey.com/en/products/detail/cvilux-usa/DH-20M50055/13175849
Chapters:
0:00 Intro
0:51 Overview of Test-Driven Development (TDD)
4:55 Implement I2C Stub
19:25 Write Unit Tests
23:33 Run Unit Tests
26:14 Conclusion Intro to Embedded Rust Part 9: Test-Driven Development | DigiKey](https://i.ytimg.com/vi/n7q4WYA9qVY/mqdefault.jpg)









