2min chapter

 Rustacean Station  cover image

C2Rust with Stephen Crane

Rustacean Station

CHAPTER

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.

00:00

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode