microsoft / microsoft/mimalloc
Pure Rust implementation of mimalloc
- Dominant language
- C
- Stars
- 13.4k
- Forks
- 1.2k
- Avg merge
- 4d 45m
- Merged PRs (30d)
- 13
Description
Hello [mimalloc](https://github.com/microsoft/mimalloc) team and community,
First of all, thank you for creating and maintaining such a robust and well-designed allocator. It's an incredibly valuable piece of technology.
We’ve developed an LLM-powered C-to-Rust transpiler that goes far beyond mechanical translation (e.g., C2Rust).
We’ve already run our end-to-end pipeline on the full mimalloc codebase and are currently in active testing.
### Early Metrics vs. C2Rust (on mimalloc core):
| Tool | RP decl | RP deref | RP arithmetic | Unsafe Line |
|----------|----------------------------|------------------|--------------------------|---------|
| **Our tool** | **44** | **41** | **38** | **51** | **314** | **18** | 73 | 51 | **34** |
| c2rust | 478 | 1274 | 477 | 9903 | 1671 | 477 | 0 | 0 | **8903** |
> *RP = Raw Pointer*
**Key advantages of our tool output:**
- **Minimal unsafe**: Only in well-encapsulated, reviewed modules (e.g., intrusive lists)
---
### We’d love your feedback:
1. **Are you open to reviewing a preview of the generated mimalloc port?**
(We can share a public repo or draft PR with CI running C test equivalence.)
2. **Initial thoughts on LLM-assisted transpilation for allocator code?**
3. **Would a PR be welcome at this stage?**
Even as an experimental, parallel implementation (e.g., `mimalloc-rs`), not to replace C, but to explore the design space.
Looking forward to your thoughts, happy to hop on a call or share early artifacts.
Thanks again for the thoughtful discussion and for building such a solid foundation in mimalloc
Thanks
Saman
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the mimalloc codebase and the issue's proposed Rust port context. The payload does not name files or tests; a concrete public repository or draft PR with CI for C test equivalence would define the implementation scope and what done looks like.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, rust
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100