Since 2026/05/11 I have been massaging the output of #c2rust run on the #metamath source code into increasingly idiomatic #Rust. Right now verification of large databases of theorems runs in about 80% of the time of the C binary but I'm haven't yet converted all the IO away from stdio routines which want NUL-terminated CStrings (and the super unsafe *const u8). I've stripped out the idiosyncratic private memory management in favor of pre-allocating vectors and string buffers which is an improvement in performance and maintaining my sanity.

In the last few months, I've been contributing a lot to the c2rust project, a suite of programs that transpiles C code into Rust code. Recently it has started flirting a bit with AI, which has made me very nervous. I've asked them to clarify their stance on it. Let's hope it turns out ok...

https://github.com/immunant/c2rust/issues/1653

#c2rust #RustLang #AI

Clarification of stance on AI use · Issue #1653 · immunant/c2rust

Recently there have been a few uses of AI/LLMs creeping into the c2rust project. First the postprocess command using LLMs internally, and now #1614. I don't think AI use is really ever justifiable,...

GitHub
In that regard - how much would it help to automate the conversion using something like #C2Rust ? github.com/immunant/c2rust
GitHub - immunant/c2rust: Migrate C code to Rust

Migrate C code to Rust. Contribute to immunant/c2rust development by creating an account on GitHub.

GitHub
@Mara I bet #C2Rust would love that, their LLVM dependency is a regular source of pain.
Played around with #c2rust to translate gwsh (a shell, a descendant from dash) from #c to #rust. Although I encountered two bugs, duly reported, where the generated code was incorrect, they required only small modifications, and after that, its translation of the shell was able to build successfully and pass all the tests I could think to throw at it.

@uuim
Well, #rustybox is just a couple of months old and I got word of it just a few days ago.

"It started out life as a direct #c2rust transpile of the #busybox project, and has been steadily improving since then."

https://github.com/samuela/rustybox/blob/master/README.md

samuela/rustybox

A free-range, non-GMO fork of busybox in 100% Rust 🦀 - samuela/rustybox