C2Rust
Ranked 6 of 6 transpilers by recommenders
Recommended for converting a C codebase to Rust that builds with the Rust toolchain and matches the original's behavior. Caveat: output is verbose, heavily unsafe, and hard to work on.
Recommended for converting a C codebase to Rust that builds with the Rust toolchain and matches the original's behavior. Caveat: output is verbose, heavily unsafe, and hard to work on.
17 people gave an opinion
- recommend it
- 6
- criticize it
- 11
- approval share
- 35%
Recommended in 3 of 13 months
- November 2025: recommended
- December 2025: not recommended
- January 2026: not recommended
- February 2026: not recommended
- March 2026: not recommended
- April 2026: not recommended
- May 2026: recommended
- June 2026: not recommended
- July 2026: recommended
- August 2026: not recommended
- September 2026: not recommended
- October 2026: not recommended
- November 2026: not recommended (month in progress)
Why it doesn’t carry the badge
- 6 people recommend itNeeds 10 or more, not met.
- 0.5 recommenders for every criticNeeds 2 to 1 or better, not met.
- Recommended in 3 of 13 monthsNeeds 4 or more, not met.
The same three rules apply to every product, and the badge can’t be bought. How the badge works
What people say about it
The reasons people give, with the number of comments that give each one. Open a reason to read what they said.
Why people recommend it
Each mark is one comment
Behavior-preserving baseline for later work
“because c2rust does these ugly things exactly to avoid introducing new issues with the more strict Rust semantics.”
Comment from 16 May 2026 in “Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"” “You may refer to c2rust to see how semantics preserving transformation without new UBs looks like.”
Comment from 19 Jul 2026 in “Claude Code uses Bun written in Rust now” “It gives you a baseline that is semantically identical to the original codebase”
Comment from 15 May 2026 in “Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"” Whole codebase builds with Rust toolchain
“That attempt succeeded in terms of getting working "Rust" code, but any attempt to change any piece to safe rust, would require thousands of changes”
Comment from 1 Jul 2026 in “The C to Rust migration book” “The value of c2rust is that you now have the entire codebase working with the rust toolchain”
Comment from 16 May 2026 in “Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"”
What people warn about
Each mark is one comment
Verbose, reads like compiler output
“what you get out is like compiler output, not something you can work on”
Comment from 13 Jul 2026 in “Zig Creator Calls Spade a Spade, Anthropic Blows Smoke” “These things are full of errors and make the code very verbose and hard to reason about.”
Comment from 15 May 2026 in “Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"” “It's more verbose than the original and harder to work on, but no safer.”
Comment from 15 May 2026 in “Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"” - Comment from 2 Nov 2025 on Hacker News
Thousands of changes to make safe
“That attempt succeeded in terms of getting working "Rust" code, but any attempt to change any piece to safe rust, would require thousands of changes”
Comment from 1 Jul 2026 in “The C to Rust migration book” “any attempt to change any piece to safe rust, would require thousands of changes across codebase”
Comment from 1 Jul 2026 in “The C to Rust migration book” Mostly unsafe code, little safety gain
“it literally will convert every pointer access into `unsafe` and 50% of your code will be `unsafe`”
Comment from 14 Jul 2026 in “Linux 0.11 rewritten in idiomatic Rust, boots in QEMU” “It relies on a library of functions which emulate unsafe C pointer semantics with unsafe Rust.”
Comment from 15 May 2026 in “Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"” “C2Rust appears to just mark everything as `unsafe` (even when it's completely unnecessary)”
Comment from 3 Jun 2026 in “Bun Has Been Converted to Rust. Now What?”
Other transpilers people recommend
The four most recommended other transpilers, with the same counts for each, so you can compare like for like. The tick on each bar marks the 2 to 1 line the badge needs.
See all 6 transpilers, rankedWhat people said
20 of the 21 comments that mention it, newest first. Each links to the original comment.
“You may refer to c2rust to see how semantics preserving transformation without new UBs looks like.”
“it literally will convert every pointer access into `unsafe` and 50% of your code will be `unsafe`”
“what you get out is like compiler output, not something you can work on”
“That attempt succeeded in terms of getting working "Rust" code, but any attempt to change any piece to safe rust, would require thousands of changes”
“any attempt to change any piece to safe rust, would require thousands of changes across codebase”
“C2Rust appears to just mark everything as `unsafe` (even when it's completely unnecessary)”
“I don't remember any publicly visible success stories for this though”
“isn't particularly helpful if you want it to be safe/ performant code anyway”
“It isn't bug-free, and C and Rust's undefined behavior semantics overlap but aren't identical.”
“The value of c2rust is that you now have the entire codebase working with the rust toolchain”
“because c2rust does these ugly things exactly to avoid introducing new issues with the more strict Rust semantics.”
“which is somewhat close to what their port produced... like their goal was from the get to go to have a mostly exactly the same as zig”
“It's more verbose than the original and harder to work on, but no safer.”
“It gives you a baseline that is semantically identical to the original codebase”
“These things are full of errors and make the code very verbose and hard to reason about.”
“It relies on a library of functions which emulate unsafe C pointer semantics with unsafe Rust.”
“C2Rust is not going to be very idiomatic.”
“From what I see, very limited testing of what C can be uplifted.”
“the c2rust output is rough but not hopeless”
“The Rust that comes out reads like compiler output.”
Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.