DC

David Cabanis

Things David Says on Podcasts

Where to Find Them

David Cabanis has been a guest on Rustacean Station .

Recently: “Embedded Software with Rust with David Cabanis” on Rustacean Station (November 2026).

What They Said

“If you come in from a full C environment and a full C culture, the cold shower is not a good option. The better option will be the gradual shower. Take that C module and work at translating that piece of C into Rust, and then through the foreign function interface, get the Rust object and the rest of the C objects to talk to one another.” — David Cabanis, Rustacean Station

The host asked how a team with a large C codebase should move to Rust. David says the biggest hurdle is cultural rather than technical, and recommends converting one module at a time.

Rustacean Station · 2026-11-22 Permalink → Listen →
Rustacean Station Around 23:20 into the episode
David Cabanis

…of agree with the way that the Rust compiler expects them to work. So there's lots of checks you need to do to ensure that what you're getting from the C world is good stuff, not corrupted stuff. But yeah, besides that, it works really well. In fact, it's surprisingly working surprisingly well.

Allen Wyma

…Rust because they see benefits going forward, right? They recognize that there's a lot of benefits for it. What would you recommend to them to do if they want to slowly, like over time, start to change each piece over? How would you recommend them to do that? How would you teach them to do that?

David Cabanis

So I think there's going straight from, let's say, you have some massive piece of C code that exists and going straight to translating it to Rust has a few hurdles, of course, in a way. And not least the cultural hurdle, right? So you have people, and I've seen that throughout my life. You have excellent software engineers who've been developing C code for years and years and years. And these people write safe C code. They know the stuff inside and out. And so convincing these people to somehow depart from their comfort zone, which is C, and do things in Rust, is always a little bit of a hurdle, understandably. It's normal. It's human, I'd say. So I think going from C to Rust is something that is best done incrementally as opposed to just turn the page and everything goes rust. Because I think that could cause a lot of problem, more individual problem more than technical problems. So what I think a lot of people probably don't realize is that you could almost visualize C, Rust by me, as a superset of the C language. In other words, what you can do in C at the low level, you know, like declaring pointers, dereferencing…

Allen Wyma

Now, you did say that basically calling C from Rust is actually quite straightforward. I'm guessing that there may be some times where there may be like a tricky part to it, right? I mean, you did mention unsafe. Is there something that else that we should keep in mind? Like what would be like the…

David Cabanis

that? So certain things in Rust are just not allowed, or certain things in C are expected to work one way, but they work a different way in Rust. So I'll give you an example, for instance. In C, commonly, if you try to do some operation, let's say you try to do a memory allocation, like some kind…

Allen Wyma

Now, I'm kind of curious about the, because we've had, I don't know how long it's been. I'm a little bit scared to even say the wrong number because I feel either be too high or too low. You know, we have decades, let's say, of stuff written in C, some stuff in C, but in any way, in C languages for…

Speaker names come from our own diarization. The position is estimated from where the line sits in the episode.
“In C, of course, you can typecast a donkey into an elephant. You can typecast anything into anything. And that here is a minefield in terms of software development. Well, in Rust, you simply can't do that.” — David Cabanis, Rustacean Station

David explains why strong typing matters for microcontroller pins that can serve several functions. He contrasts Rust with C, which lets you cast any type into any other.

Rustacean Station · 2026-11-22 Permalink → Listen →
Rustacean Station Around 12:34 into the episode
David Cabanis

…about so he contacted me and we had some really interesting conversations around what could be done and about something later I've got I've got those 10 chapters done and I'm still kind of polishing things up a bit but yeah that's that's how we how we got we got to we got to that book in the end

Allen Wyma

…with C versus when you're working with Rust is there's particular bugs that that Rust can catch that C cannot besides obviously that you know the memory management things like that is there is there other things that make Rust a more valuable language for embedded development than compared to C?

David Cabanis

…is strongly typed. So this is why ADA was chosen by the American DoD as a prime language for software development for DOD-related projects. Because you have that added safety. When you have a strongly type language, if you declare a variable of a specific type, you can only assign to that variable values of that type, unlike things like Python is very loose about types, or even C, because in C, of course, you can typecast a donkey into an elephant. You can typecast anything into anything. And that here is a minefield in terms of software development. Well, in Rust, you simply can't do that. The Rust compiler will say, no, you can't do that. This is not the right type. And it won't allow you to compile. So a practical example again in embedded software development will be something like IO ports. So most of those microcontrollers have Mayo ports and they are fairly generic. A little pin for an I/O port can be used for an L2D converter, but can also be used for a general purpose I/O…

Allen Wyma

Now, in your book, you do do something which is quite important. I think people who are writing Rust don't always do, which is you need to build a no standard binary from scratch, right? What's actually involved with that? And why is that such a big deal that you need to make a very clear point…

David Cabanis

So that's a really good question. So as I mentioned, the book is called Embedded Software with Rust. And there's always a heated discussion around what do you mean by embedded. And some people would say, embedded Linux is embedded programming. Or in my case, when I look at embedded, and I think a…

Allen Wyma

What about when you boot an application for embedded development with Rust versus C, is there something that's kind of different about it, or is it basically exactly the same? Now, the reason I ask that is because, you know, I had one of my first episodes, maybe even the first episode I ever did on…

Speaker names come from our own diarization. The position is estimated from where the line sits in the episode.
“You never wrote that test case, and so you never saw that the bug existed. So you just release your software, and then 10 years later you've got a car crashing into a wall, because suddenly that particular condition creates that bug. In Rust, you will not be able to release the software, because it will never compile. So unless you fix the bug, you don't have a software to release.” — David Cabanis, Rustacean Station

David is making the case for Rust's strictness in safety-critical firmware: it forces out bugs that no test ever exercised. This closes his long answer on ownership and strong typing in embedded code.

Rustacean Station · 2026-11-22 Permalink → Listen →
Rustacean Station Around 12:34 into the episode
David Cabanis

…about so he contacted me and we had some really interesting conversations around what could be done and about something later I've got I've got those 10 chapters done and I'm still kind of polishing things up a bit but yeah that's that's how we how we got we got to we got to that book in the end

Allen Wyma

…with C versus when you're working with Rust is there's particular bugs that that Rust can catch that C cannot besides obviously that you know the memory management things like that is there is there other things that make Rust a more valuable language for embedded development than compared to C?

David Cabanis

Yes, so developing firmware in Rust sort of coerces you to follow some very strict rules in terms of how you're going to program, but also more importantly, how you're going to use resources. So you touched on memory management and there's also the aspect of ownership. So these are two pillars of Rust, right? Memory management and ownership of things, which is of course related. You also have this aspect of lifetimes as well. And in practice, what it means with Rust is that when you're going to try and access some hardware, if you do firmware development in Rust, there can only be one owner for a specific piece of hardware. So if you have inside a market controller, you have, let's say, a GPIO controller or you have a UART or something like this. When you are going to write your Rust code, and if you want to use that particular piece of hardware, you're going to have to take ownership. So you essentially have some kind of variable that represents the entirety of all the components that exist inside your microcontroller or microprocessor. And at some point, you're going to say, right, well, out of this big bundle of components that exist inside my microcontroller…

Allen Wyma

Now, in your book, you do do something which is quite important. I think people who are writing Rust don't always do, which is you need to build a no standard binary from scratch, right? What's actually involved with that? And why is that such a big deal that you need to make a very clear point…

David Cabanis

So that's a really good question. So as I mentioned, the book is called Embedded Software with Rust. And there's always a heated discussion around what do you mean by embedded. And some people would say, embedded Linux is embedded programming. Or in my case, when I look at embedded, and I think a…

Allen Wyma

What about when you boot an application for embedded development with Rust versus C, is there something that's kind of different about it, or is it basically exactly the same? Now, the reason I ask that is because, you know, I had one of my first episodes, maybe even the first episode I ever did on…

Speaker names come from our own diarization. The position is estimated from where the line sits in the episode.

Collections They Appear In