Rust, my first embedded language (1/5)

Rust, my first embedded language (1/5)
First-up is Henk Dieter, backend developer at Tweede golf. He has been interested in Rust for quite some time. Actually, it’s how Henk Dieter found out about Tweede golf, as it was one of the first companies in the Netherlands to adopt Rust as their weapon of choice.

This is part 1 of 5 of our series "Why we love Rust". Check out the complete series here

Can you tell us about your introduction to Rust?
As my first project, I followed the Discovery book, an introduction to embedded software development in Rust. I was especially charmed by the ease of setting it all up. It felt like a kind of professional Arduino environment. After that, I worked on LZJD-rs, a Rust implementation of the Lempel-Ziv Jaccard Distance algorithm, where I’ve gotten to know Rust’s profiling tools.

What’s your personal reason for using Rust?
Coming from Web development, Rust was excellent as a first Systems programming language. It helps you prevent commonly made mistakes in systems programming at compile time. When developing Rust, the compiler gives you a lot of confidence that your code will run without obscure errors.

Henk Dieter's takeaway
The compiler is a firm but fair teacher. Oftentimes, when it compiles, it’ll work. That's pretty amazing when you think about it.

Are you working on Rust projects at Tweede golf right now?
I’m participating in a research project where we’re developing an easily extendable hardware platform that supports long-range, low power communication. We are writing its firmware in Rust. Currently, my objective is to write a LoRa modem driver, that is generic enough to be compiled for multiple CPUs.

Can you tell us what really convinced you about Rust?
Great tools like Cargo, the enthusiastic and helpful community, clear compiler errors, and async-await are examples of things that Rust just does right. This enables you to stay focused on the actual problem you are trying to solve.

Henk Dieter's takeaway
You often hear about ‘fighting the borrow checker’ as one of the harder things about Rust, but in the end, it helps you prevent those mistakes and the knowledge gained by ‘fighting the borrow checker’ is directly transferable to other programming languages.

Where will Rust be in 5 years?
Rust will take a much more prominent position in the software development landscape. I think a lot of companies will recognize the advantages of Rust over other languages. Perhaps that will mean Rust will lose it’s ‘Most loved language’ title as more and more people will begin to use it in a professional environment, instead of personal projects. With a higher percentage of imposed use (i.e. companies forcing developers to use it), Rust might become "dreadful" for some. But probably that’ll be a good thing as it means the language reaches maturity!

More by Henk Dieter
In a blog post, Henk Dieter explained the benefits of Rust's type system, which are extremely powerful in an embedded context: Why Rust is a great fit for embedded software

Stay up-to-date

Stay up-to-date with our work and blog posts?

Related articles

At Tweede golf we're big fans of creating applications on embedded devices with Rust and we've written a lot about it.

But if you're a hardware vendor (be it chips or full devices/systems), should you give your users Rust support in addition to your C support?

In this blog I argue that the answer to the question is yes.

A while ago, in 2020, I wrote a blog post similar to this one. Sure, it has a bit of a clickbait-y title, but it couldn't be more accurate. At the time I was full of amazement about the way Rust tackles embedded software development. I forsaw great things for Rust's future, even though Rust and its ecosystem were yet not quite mature. We're 3 years further down the road right now, which is like 300 Rust years as Rust is progressing fast. About time for an update!
NLR, Royal Netherlands Aerospace Centre, invited embedded lead Dion to explain the benefits of programming in Rust to the company.