immunant/c2rust
View on GitHub ↗ ★ 4,832 Rust
Migrate C code to Rust
56 mentions on Hacker News by 32 people: 5 stories, 51 comments · first 2018-07-02 · latest 2026-07-05
20082026
-
…result in just as much unsafe) than a result of LLMs reaching for escape hatches too liberally. [1] https://github.com/immunant/c2rust
comment by gpm · 2026-07-05 · in Command and Conquer Generals natively ported to macOS, iPhone, iPad using Fable -
…bug-free, and C and Rust's undefined behavior semantics overlap but aren't identical. One example: https://github.com/immunant/c2rust/issues/1678 I firmly believe the right way to port C and C++ (and Zig) programs to Rust is to do it…
comment by tomjakubowski · 2026-05-17 · in Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust" -
…utilize decompilation techniques, I do not see anything of that in any existing project. - C2Rust: https://github.com/immunant/c2rust From what I see, very limited testing of what C can be uplifted. - Citrus:…
comment by kant2002 · 2025-11-03 · in Automatically Translating C to Rust -
There's non-LLM research towards doing this which has a few success stories: https://github.com/immunant/c2rust LLMs seem generally unsuited for the task, because they're fundamentally approximators that won't always get things right, and…
comment by gpm · 2025-10-16 · in Upcoming Rust language features for kernel development -
Past work in the area by the folks at Immunant ( https://immunant.com/ ) that appears to be on-going https://github.com/immunant/c2rust . I think the project was also DARPA funded for a time.
comment by brendank310 · 2025-10-02 · in DARPA project for automated translation from C to Rust (2024) -
…this in their closing remarks: > The next goal is to convert the codebase to safe Rust. [1] https://github.com/immunant/c2rust/raw/master/docs/c2rust-ov...
comment by jonpalmisc · 2025-07-03 · in Introducing tmux-rs -
▲ 3
C2rust: Migrate C Code to Ruststory by Bogdanp · 2025-07-02 · 0 comments
-
…going to use tools to transpile, don't use something that hallucinates. You want it to be precise. https://github.com/immunant/c2rust reportedly works pretty well. Blog post from a few years ago of them transpiling quake3 to rust:…
comment by Twirrim · 2025-06-18 · in Bzip2 crate switches from C to 100% Rust -
See https://github.com/immunant/c2rust
comment by fabrice_d · 2025-04-12 · in Rust to C compiler – 95.9% test pass rate, odd platforms -
…C to legal (unsafe) Rust is quite possible; there is indeed already a tool that does this ( https://github.com/immunant/c2rust ). The problem you run into is that the conversion is so pedantically correct that the resulting code is…
comment by jcranmer · 2024-08-03 · in Translating All C to Rust (TRACTOR) -
…quick web search reveals some other efforts, such as c2rust [1]. I wonder how TRACTOR differs. [1] https://github.com/immunant/c2rust
comment by rectang · 2024-07-30 · in Translating All C to Rust (TRACTOR) -
…"pie in the sky" thing, Immunant has a working C to Rust transpiler and it's really interesting: https://github.com/immunant/c2rust
comment by jcalvinowens · 2024-07-30 · in Translating All C to Rust (TRACTOR) -
…An example of the latter: c2rust, which is a work in progress but is very impressive https://github.com/immunant/c2rust It currently translates into unsafe Rust, but the strategy is to separate the "compile C to unsafe Rust" steps and the…
comment by steveklabnik · 2024-01-10 · in Converting the Kernel to C++ -
…the article is 2022-06-13. Has there been further progress? The article links to their github repo: https://github.com/immunant/c2rust There's commits in the last hour, so at least some signal of life.
comment by meepmorp · 2023-03-15 · in Emitting Safer Rust with C2Rust -
▲ 119
C2Rust Transpilerstory by Aissen · 2022-10-20 · 63 comments
-
…Rust, then try to port it back and forth. It would be much better if you can use Rust though. [1]: https://github.com/immunant/c2rust
comment by stevefan1999 · 2022-04-09 · in Old C code – how to upgrade it? -
https://github.com/immunant/c2rust : > We rely on Emscripten's Relooper algorithm to translate arbitrary C control flows. Article on why Relooper isn't good enough and the superior Stackifier algorithm, which they probably should be using…
comment by JoelJacobson · 2022-02-02 · in C2rust: Transpile C to Rust -
…and then refactored it to mostly safe Rust. I ran into a number of issues https://github.com/immunant/c2rust/issues?q=is%3Aissue+autho... but it generally worked ok. I found refactoring the resulting Rust code somewhat error prone a
comment by muizelaar · 2022-02-02 · in C2rust: Transpile C to Rust -
What I am most curious about is the final paragraph of https://github.com/immunant/c2rust#acknowledgements-and-lice... There was a while there where they were trying to test this out on the cvs codebase, IIRC. It's a good candidate:…
comment by steveklabnik · 2022-02-01 · in C2rust: Transpile C to Rust -
…This is meant to be only the first step in a Rust refactor. https://galois.com/blog/2018/08/c2rust/ https://github.com/immunant/c2rust/wiki/Known-Limitations-of...
comment by estebank · 2022-02-01 · in C2rust: Transpile C to Rust -
▲ 3
C2Rust – migrate C99-compliant code to Ruststory by lnyan · 2021-03-08 · 0 comments
-
▲ 2
C2rust: Migrate C Code to Ruststory by yagizdegirmenci · 2021-02-27 · 0 comments
-
There's a translator for C99 to (unsafe) Rust: https://github.com/immunant/c2rust So probably you can give me any C program and I'll be able to give you an equivalent Rust program. It'll probably perform about the same, too.
comment by efaref · 2021-01-03 · in Rust is now overall faster than C in benchmarks -
Could the effort be bootstrapped by using a C to Rust translator, like https://github.com/immunant/c2rust , preserving the existing semantics prior to updating the code to remove the "unsafe" tags.
comment by greg7mdp · 2020-08-12 · in QEMU should move from C to Rust -
…zstd and why it is so fast and such an amazing technology. I also recompiled zstd into rust using https://github.com/immunant/c2rust and tried using various webasm mechanisms to run it (I didn't get webasm quite fast enough, and teaching…
comment by daniel_rh · 2020-08-04 · in Broccoli: Syncing Faster by Syncing Less -
…is a good refactoring tool[1][2] to automate the process. It also allows scripting in Lua[3]. [1] https://github.com/immunant/c2rust/tree/master/c2rust-refact... [2] https://c2rust.com/manual/c2rust-refactor/commands.html [3]…
comment by xvilka · 2020-07-11 · in Linux kernel in-tree Rust support -
…C to Rust by using their tool c2rust[2]. [1] https://immunant.com/blog/2020/06/kernel_modules/ [2] https://github.com/immunant/c2rust
comment by xvilka · 2020-07-11 · in Linux kernel in-tree Rust support -
…that can convert basic Java constructs to Rust. It can be taken as a base and improved. [1] https://github.com/immunant/c2rust [2] https://users.rust-lang.org/t/java-to-rust-converter-for-ted... [3] https://github.com/aschoerk/converter-pag…
comment by xvilka · 2020-07-02 · in RedHat Mandrel Makes Java Native -
…to run tests. Or, on the other side, c2rust should get an Objective C support as an input. [1] https://github.com/immunant/c2rust
comment by xvilka · 2020-05-16 · in Swift 5.3 Will Be Supported on Windows and Additional Linux Distributions -
There is also https://github.com/immunant/c2rust
comment by steveklabnik · 2020-03-11 · in Windows has a new wormable vulnerability, with no patch -
It can be semi-automated with the amazing c2rust[1] tool. [1] https://github.com/immunant/c2rust
comment by xvilka · 2020-02-12 · in Several months in the life of Project Zero – Part 1: The Chrome bug of suffering -
…looking code; in terms of readability. But as mentioned in other threads, the refactoring tool ( https://github.com/immunant/c2rust/tree/master/c2rust-refact... ) aims to fix that.
comment by saldivarcher · 2020-01-07 · in Translating Quake 3 into Rust -
…in parallel (and with the intent to consume the output of) c2rust. Development on that occurs here: https://github.com/immunant/c2rust/tree/master/c2rust-refact... .
comment by harpocrates · 2020-01-07 · in Translating Quake 3 into Rust -
Step 2 has been happening concurrently, and pretty much since the start of the project. See https://github.com/immunant/c2rust/tree/master/c2rust-refact... . It is just a lot tougher to get right, so it gets less publicity.
comment by harpocrates · 2020-01-07 · in Translating Quake 3 into Rust -
…[1], but for Java. There exist[2] some kind of automation, buts it's too basic to be practical. [1] https://GitHub.com/immunant/c2rust [2] https://github.com/aschoerk/converter-page
comment by xvilka · 2019-12-25 · in Java JIT vs. Java AOT vs. Go for Small, Short-Lived Processes -
Just use the c2rust[1] tool to "extend" C. [1] https://github.com/immunant/c2rust
comment by xvilka · 2019-12-04 · in C-for-all: Extending C with modern safety and productivity features -
…C2Rust[1] proves that. Just can be improved with new languages and refactoring capabilities. [1] https://github.com/immunant/c2rust
comment by xvilka · 2019-12-03 · in Microsoft is creating a new Rust-based programming language for secure coding -
…C2Rust[1][2] to support C++[3] and C# to ease their migration instead. [1] https://c2rust.com [2] https://github.com/immunant/c2rust [3] https://github.com/immunant/c2rust/issues/162
comment by xvilka · 2019-12-03 · in Microsoft is creating a new Rust-based programming language for secure coding -
…tool. [1] https://github.com/remacs/remacs [2] https://www.emacswiki.org/emacs/GuileEmacs [3] https://github.com/immunant/c2rust/
comment by xvilka · 2019-11-26 · in Emacs: The Editor for the Next Forty Years [video] -
…of lessons learned and future directions for Rust and C integration. [1] https://c2rust.com [2] https://github.com/immunant/c2rust [3] https://immunant.com/blog/2019/11/rust2020/
comment by xvilka · 2019-11-21 · in How to make your C codebase Rusty: rewriting keyboard firmware keymap -
…as c2rust tool. Would be nice to integrate with c2rust somehow, if someone wants to help. [1] https://github.com/immunant/c2rust [2] https://c2rust.com/manual/c2rust-refactor/index.html [3] https://github.com/tectonic-typesetting/tectonic/i…
comment by xvilka · 2019-10-23 · in How to not rewrite it in Rust -
…the code will be removed, for example image handling can be done through image-rs crate, etc. [1] https://github.com/immunant/c2rust
comment by xvilka · 2019-10-07 · in Tectonic – TeX/LaTeX Engine in Rust -
…about oxidation plans. And there is a bunch of issues[3] if you want to help the project. [1] https://github.com/immunant/c2rust [2] https://github.com/tectonic-typesetting/tectonic/issues/459 [3] https://github.com/crlf0710/tectonic/issues
comment by xvilka · 2019-09-13 · in Rewriting TeX/LaTeX Engine in Rust -
Convert the QuickJS code into Rust using c2rust[1], then reuse in rq. [1] https://github.com/immunant/c2rust
comment by xvilka · 2019-07-11 · in QuickJS JavaScript Engine -
…a C to -betterC transpiler just like there has for Rust (e.g. C2Rust [0], Corrode [1])? [0] https://www.github.com/immunant/c2rust [1] https://www.github.com/jameysharp/corrode
comment by dataking · 2019-07-02 · in D as a C Replacement -
…next thing that is important - make it command line tool[3], instead of being a web service. [1] https://github.com/immunant/c2rust/ [2] https://github.com/aschoerk/converter-page/issues/6 [3] https://github.com/aschoerk/converter-page/issu…
comment by xvilka · 2019-06-14 · in Simple Converter Interface, Java/Rust -
…become comparable too. [1] https://github.com/rust-unofficial/awesome-rust#development-... [2] https://github.com/immunant/c2rust [3] https://github.com/aschoerk/converter-page
comment by xvilka · 2019-06-03 · in Essential Rust Tools -
▲ 1
Automatic Converter from C to Ruststory by xvilka · 2019-05-15 · 0 comments