Connect your Claude, Codex or OpenClaw for full transcripts on millions of podcasts. Two week free trial, cancel anytime.
Start free trial →Rustacean Station · Hands-On Engineering Podcasts · October 2026
Kruckenberg was describing migrating large C code bases to Rust. He says the textbook advice is to start with leaf modules and work upward, and explains why that rarely works in practice: the easy leaf modules are usually not the ones worth porting for memory safety.
…and easy to get started with for people from those languages. You're migrating your existing code base from whatever language to Rust. And so it should pick you up where you are, effectively, all the learning resources that we do try to do exactly that. And this really is no exception. So yeah.
…of curious, right? Because it's been done many times. What kinds of things did you think were actually going to be kind of easy when it comes to large code base migration from C to Rust? And maybe it was not so easy. And even vice versa. People always have a preconceived notion when they start.
Right, right. So the biggest technical challenge, and I think the technical challenges are most interesting here, is that we always say the classic saying of like, oh, you start kind of with the leaf modules and then you work your way upwards. That's kind of the textbook approach to migrating something, right? Rewriting something. And the truth also is that that always never works, almost never works, simply because if you draw this diagram of like, you know, your graph of dependencies and then you look at the leaf modules, like the first challenge with that is like, how do you, how do you obtain this graph? Quite often, the dependency trees of real world projects are so messy and entangled that it's not quite clear even how you like obtain such a graph to begin with. And then if you manage to get it without cycles or whatever, then at that point, it is still so entangled that it is really, really unclear where even leaf modules are. And on top of that, quite often the leaf modules are not really the interesting modules. Because we always want to migrate a code base to Rust for a reason. And that reason usually is memory safety, especially for C ⁇ . So and sort of memory unsafety or like risk is never uniformly spread over a code base. So there will be modules where we look at them and they're like a leaf module that would be very easy to…
I mean, you kind of started touching on this a little bit, right? I'm kind of curious because basically once you start porting stuff, you're going to be porting over time. Now, I'm kind of curious about some simple hurdles that you ran into where you wrote the FFI and Rust to the C part, and it…
Oh, yeah, yeah. I mean, like, I don't have a good example for you, unfortunately, just because undefined behavior, for example, is a scary word for most engineers, but it is kind of a fact of life for what we do, right? Because having some kind of like hitting some kind of undefined behavior almost…
Okay. I mean, it's good to know. I can totally understand. Sadly, because we started late because I forgot my special high-speed USB. You only got one of those, you know, so we have to actually cut the recording soon. But I just want to kind of leave this last note. Maybe we should probably end…