Rustine: mimalloc C → Rust Translation#1212
Rustine: mimalloc C → Rust Translation#1212enum-class wants to merge 1 commit intomicrosoft:dev3from
Conversation
This PR presents an initial version of Rust translation of Microsoft's mimalloc (dev3 branch) using Rustine, an LLM-powered C-to-Rust whole-repository translation/validation/debugging pipeline. The translation of the entire repository (including application and test code) is 100% compilable.
@microsoft-github-policy-service agree [company="University of Illinois Urbana-Champaign"] |
@microsoft-github-policy-service agree company="University of Illinois Urbana-Champaign" |
|
The LLM output looks quite bad, presumedly since it tries to stay close to C without using idiomatic Rust. The use of references I've seen looks highly questionable also. Compare it to https://github.com/Zoxc/fjall for a more proper Rust port. |
This PR presents an initial version of Rust translation of Microsoft's mimalloc (dev3 branch) using Rustine, an LLM-powered C-to-Rust whole-repository translation/validation/debugging pipeline. It is worth noting that C2Rust fails to translate mimalloc because it struggles with complex atomic operations and strict thread-safety requirements. In contrast, Rustine succeeds by focusing on semantic intent rather than relying on shallow, syntax-level transpilation.
The translation of the entire repository (including application and test code) is 100% compilable. Test translation quality is manually checked, and execution of translated tests on translated code results in 100% test pass (test_api, test_api_fill, test_stress).
Please review the translations and let us know if you are interested in additional stats related to Rust code (safety features, raw pointer usage, including pointer arithmetics, clippy results, and code quality metrics). We would be happy to incorporate your feedback into the pipeline and improve the translation.