C2Rust: Migrating Legacy Code to Rust
summary
Three open source tools: a transpiler that uses clang and compile_commands.json to emit structurally equivalent but unsafe Rust (lots of wrapping_add pointer ops and malloc style allocs), a dynamic analysis runtime that runs C and Rust side‑by‑side via an MBE or log‑based cross‑check intercepting syscalls to compare arguments and returns, and a nascent refactoring tool that turns idioms like counted while loops into range for loops; demos and code live at c2rust.com and github.com/immunant/c2rust.
AI-written summary · about
chapters (24)
- 0:00Intro
- 0:36Legal Disclaimer
- 1:06Introduction
- 1:36Team
- 2:07Why C2Rust
- 2:51Why Rust
- 4:29The Flow
- 6:15Goals
- 7:29C2Rust
- 10:41Invoke the compiler
- 13:19Limitations
- 15:04Web Demo
- 15:43Docker Vagrant
- 16:36Build Translator
- 17:05Transpiler
- 17:57Rust Output
- 19:17CrossCheck Tool
- 19:35CrossCheck Example
- 20:17CrossCheck Options
- 22:18Crosschecking
- 23:05Logbased Crosschecking
- 24:25Pie in the Sky
- 27:09Work with us
- 27:32Github
related talks
38mCorrosive C - Compiling Rust to C to target new platforms
19mCpp2Rust: Automatic Translation of C++ to Safe Rust
41mWe can have nice things
15mTranslating C to Safer Rust
53mC++/Rust Interop: A Practical Guide to Bridging the Gap Between C++ and Rust
59mRust for C++ developers - What you need to know to get rolling with crates
01h 22mRust for the C++ Programmer
01h 04mRust-ifying Your C# Codebase: A Tale of Adventure and Transformation
