r/coolgithubprojects • u/erkamyaman • 2h ago
rust-anything: rewrite your app in Rust one piece at a time and prove every piece behaves like the original. Now 9k stars, 44 contributors and a docs site
https://github.com/erkamyaman/rust-anything
Disclosure: I'm the author. I shared it here last week; since then it got a proper docs site, 4.1.0, and a lot of help from 44 contributors, so here's the update.
What it is
A CLI + MCP server that helps you (or a coding agent like Claude Code, Codex or Cursor) port an existing app to Rust one function or module at a time. It records what your original code actually does, then replays every recorded case against the Rust port. Nothing ships until the outputs match byte for byte.
Why it's useful
Rewrites usually break on behavior nobody wrote down: edge cases, error types, side effects. rust-anything turns the running original into the spec. Measured so far:
- Prettier in Rust: 19x faster, 15,861 of 17,224 runs fully in Rust, every run byte-identical
- ESLint in Rust: 10,585 / 10,585 recorded runs identical, 25.9x faster per file
- json-server as one Rust binary: 74 MB idle down to 3.5 MB
- The slow cases are published too: calling Rust once per tiny function is often slower than a JIT, and
benchtells you so
Languages: TypeScript/JS, Python, C, Go, Ruby, Java, Kotlin, PHP, C# and PowerShell.
New since last time
- Docs site in 25 languages: https://rust-anything.com
enable --only/--partialto switch ported functions on one at a time- Emails recorded as parsed MIME parts, Java/Kotlin wildcard generics, C# nested exceptions, and dozens of fixes from contributors
How I'd use it
Pick the hottest function in a slow Node or Python service, let profile confirm it's worth porting, record it, let your agent write the Rust, and only switch it on when gate passes.
MIT licensed, macOS, Linux and Windows.