ESP & Rust: A Match Made in Heaven

December 14, 2025  |  Programming  ·  Smart Home

One of my slow-going hobbies is tinkering with microcontrollers.

It all started when I was a child. During a summer school break in my grandparents’ village, I found a huge box of electrical components. The box belonged to my uncle, who was apparently into this stuff. Needless to say, I didn’t understand a thing and broke a lot of it, but the whole process fascinated me and made me curious about how things work under the hood.

My second attempt to figure out what those fancy electronic components do came in 2018. I bought an Arduino board with a starter kit and a book. It was a fun read, and I grasped the basics. But this hobby is slow-going, so I put things on pause again.

The third attempt was in 2020, right after the Raspberry Pi 4 was released. I got interested and ended up ordering six boards in total. It was a great experience, I picked up some essential sysadmin skills and got into self-hosting, which motivated me to keep blogging once my interest in finance cooled off and I didn’t know what else to write about.

The fourth and latest attempt to dive into electronics and microcontrollers started this year, in 2025, and it’s still going. ESP is all the rage now, so I ordered a bunch of Seeed Studio XIAO ESP32C6 boards. They’re really nice. I started with Arduino but quickly outgrew it, which begs the question: what’s next?

The first, officially recommended option is ESP-IDF, which is a heavy and invasive pile of crap you have to install, and you have to write in C or something like that. That’s a pretty bad option, honestly, but it does offer much more control over the board, so it’s clearly better than staying on Arduino.

The second and unexpected option was discovering The Rust on ESP Book. Rust is a modern language I’m familiar with, and it turns out I can use my standard Rust workflow and tools to write ESP firmware. At first, I thought you still needed ESP-IDF installed, but after looking into it more, I realized it’s completely standalone.

This combo is really exciting, and I’ve already started working on two projects:

temp-hum-sensor

pm-sensor

The first one is a simple temperature and humidity sensor using multiplexed I2C, and the second is a PM2.5 sensor using UART. Both I2C and UART are essential building blocks if you want your board to interact with external components, and I wanted to make sure they work smoothly in my Rust setup.

The next step is adding Zigbee or Matter support so I can integrate my DIY sensors into my Home Assistant smart home. Exciting times ahead!