Rustacean Station  cover image

C2Rust with Stephen Crane

Rustacean Station

00:00

C to Rust - How to Parse C Source Code

Any tool that operates on C code has to know the precise details of how it's compiled. The preprocessor in C does different things depending on what was defined of the command line and what compiler options you passed. We actually use a tool standard format. Compile commands dot JSON. Clang supports this as a first class thing. If your C source code is fairly, fairly standard, you're not doing any weird things, you can just cargo run and you'll have a completely unsafe rust project That is equivalent to the C project.

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app