hn.today

Port your codebase to Rust with AI coding agents

github.com12 points2 comments
Screenshot of Port your codebase to Rust with AI coding agents

Rust Anything is an open-source, local tool for migrating existing code to Rust with AI coding agents. It does not translate code itself: it profiles a workload, identifies a promising unit, creates the Rust bridge and hands implementation to an agent. Before switching callers to the port, it records how the original behaves and checks the Rust version against those cases. Completion requires matching recorded outputs, errors and side effects, alongside formatting, lint, tests, safety and stub checks. It can handle individual functions or whole command-line applications and servers, keeping unported code behind a Rust front end until migration is complete. Analysis and profiling work without a model; the tool sends no code or results elsewhere.

Reported trials include byte-identical results for 17,224 Prettier cases and 10,585 ESLint cases, plus matching results across 226,447 recorded calls to ffmpeg’s libavutil. Other examples include a Rust version of json-server that served about 5.8 times as many requests per second, and fuzzy search up to 32 times faster across all cores. These are project-specific results, not a promise that Rust will always be faster: frequent calls across a language bridge can make a port slower, so profiling and batching matter. The tool supports verified workflows across several languages, offers replay, fuzzing and regression checks, and includes safeguards for recording real applications; users should test on copies and use sandboxing where appropriate.

Read on github.com2 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

Show HN: Rust Commander

Show HN: Rust Commander

Rust Commander is a Rust terminal file manager modeled on Midnight Commander, with dual-pane navigation, a persistent shell, archive and remote browsing, and background file operations. Version 0.3.1 adds file-change alerts, viewer copy controls, customizable skins, and faster SFTP previews and copying. (github.com)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.