AI in 3 Days: 70,000-Line Cobol Compiler Ported to Rust, Signaling Shift in Legacy Migration

By ✦ min read

In a stunning display of artificial intelligence capability, a team has ported the GNU Cobol compiler to Rust—producing 70,000 lines of code in just three days. The project, which used large language models (LLMs) to automate translation, marks a turning point for legacy system modernization.

“This is yet another sign of LLMs’ ability to do a good job porting existing code to a new platform,” an attendee of a recent software development retreat told Fragments. The result, a behavioral clone of the original compiler, demonstrates how AI can drastically cut the time and cost of rewriting old software.

Background: The Retreat and Chatham House Rule

The breakthrough was shared at a retreat that brought together professionals from software development to discuss the future of agentic programming. The event was held under the Chatham House Rule, meaning speakers cannot be identified without permission. Many attendees work with legacy systems in finance and other regulated industries.

AI in 3 Days: 70,000-Line Cobol Compiler Ported to Rust, Signaling Shift in Legacy Migration
Source: martinfowler.com

For years, experts have debated whether to “lift and shift” legacy code to new platforms or reengineer it from scratch. The new AI tool has upended that debate.

What This Means for Legacy Migration

“Lifting and shifting to a new platform should now always be the first step in a legacy migration,” said one attendee who works extensively in the field. “The cost is no longer as formidable as it used to be, and a better environment makes further evolution much cheaper. Just don’t stop there.”

Previously, many experts dismissed “lift and shift” as a missed opportunity, arguing that old systems are bloated with unused features. A 2014 Standish Group report found that up to 50% of features in legacy software are never used by end users. But AI-assisted porting changes the economics.

“Before LLMs, we saw little value in simply moving code to a newer language while keeping the same bloat,” said a former critic of lift-and-shift. “Now, the migration itself is cheap enough that you can afford to do it first, then trim features based on actual user needs and business outcomes.”

Beyond Porting: AI Interviews Experts

Another attendee shared a novel use of LLMs: using the model to interview a human expert about a specification document. The AI asks questions to verify correctness, turning the process into an “Interrogatory LLM.” Large specs are often too complex for manual review, but this method helps surface errors.

Lessons from Change-Control Boards

“The first thing I do when consulting is read the guidelines for an organization’s change-control board,” a consultant remarked. “That’s the scar tissue of what’s gone wrong in the past.” The comment highlights how understanding past failures is crucial to improving software reliability, especially in high-stakes environments like banking.

Urgent Implications for Regulated Industries

Several attendees work in finance, where legacy code is governed by strict regulations. The ability to quickly port code to modern languages like Rust—which offers memory safety and better performance—could reduce risk while complying with tightening regulatory controls.

“We can’t afford software errors with money,” one financial industry attendee said. “AI-assisted migration might finally give us a path to update core systems without breaking compliance.”

— Reporting contributed by attendees of the retreat. Some details have been generalized to protect anonymity under the Chatham House Rule.

Tags:

Recommended

Discover More

Tokenized ETFs Break $430M On-Chain Milestone as Ondo Finance's IVVon Dominates with 150% SurgeForecasting Alphabet's 20-Year Growth: Q&A on a $10,000 InvestmentGitHub's Enhanced Status Page: Greater Transparency and AccuracyRivian Surges Past Expectations with Record Q1 Deliveries as R2 Production Ramps UpGitHub’s AI Agent Automatically Fixes Code Barriers—Over 3,500 Pull Requests Reviewed