Google has an official agent skill called migrate-to-rust that takes a legacy codebase in C, C++, Fortran, Java, Python or shell and ports it to Rust, with the crate locked against any unsafe code. Spanish developer Miguel Ángel Durán, known online as midudev, put it in front of a wide audience on 27 November, and his post has about 39,500 views. The skill isn’t new. Google added it to its skills repository as version 1.0.0 in October, and its Antigravity team described it on 3 November alongside a Fortran-to-Rust demo.
The demo is where the numbers come from. Google says Antigravity, running Gemini 4 Argon, ported the core of a 174,774-line Fortran ocean model to Rust in 59 minutes, matched the original on 100 test seeds, ran 1.88 times faster and used 54% less memory. All of those are Google’s own figures from one run. The port itself isn’t public.
59 min
autonomous run, per Google
1.88x
faster than the Fortran original
3.91e-13
parity across 100 seeds, not zero
What the skill is
A skill is a folder with a SKILL.md file of instructions that an agent loads when a task matches. This one sits in google/skills, a repository of 220 skills for Google products. Install is npx skills add google/skills, and Google says that in Antigravity the whole pipeline runs with one command:
/migrate-to-rust <github-repo-url>
The file tells the agent to act as a systems architect, performance engineer and Rust specialist. It names the legacy languages it handles (C++, Fortran, Java, Python, C and shell), sets the target as “100% Safe Rust”, and asks for two outputs besides the code: a first-person account of the migration written by the AI, and an interactive HTML scorecard. The description says to skip it for unrelated refactoring and single-line syntax questions.
It also bundles a stdlib-only Python script, telemetry.py, that logs timings, test runs and benchmark stages to a migration_telemetry.json file and renders the scorecard. A read of the script shows no network calls and no subprocesses.
How it works, stage by stage

- Stage 0: baseline. The agent clones the repository, scans it, and records code size, comment density and raw-pointer hazards. It then has to show you the build command, the run command and the working directory and get your confirmation before it compiles or runs anything from a cloned repository. Once confirmed, it builds the legacy code in release mode, records golden outputs across deterministic seeds, and logs run time and peak memory.
- Stage 1: audit and blueprint. It reads the code, logs opportunities and latent bugs, and writes a six-part architectural blueprint. It then moves straight on to Stage 2 unless you asked for a plan only.
- Stage 2: port, heal, tune. It scaffolds a Rust workspace with
#![forbid(unsafe_code)], writes modules of 400 lines or fewer with doc-tests, runscargo testandcargo clippy, and compares the Rust binary with the legacy one across seeds within a stated numerical tolerance. It finishes with LLVM profile-guided optimisation and link-time optimisation, then renders the scorecard.
The limits are written into the file. The agent gets 5 self-healing rounds, or 15 minutes per phase, to fix failing tests or diverging output. If something still fails, it has to record the partial state and document the gap instead of looping. The stated definition of done is zero clippy warnings, at least 95% branch coverage, and output parity within a documented epsilon.

The skill builds and runs code from a repository you didn’t write, so Stage 0 is the one place a human is asked to look before anything executes. Where the host allows autonomous execution, the file tells the agent to carry on from there without pausing. Running it in a sandbox or a throwaway container is still sensible.
What Google says it did with FVCOM
The skill came out of an internal stress test described in a 3 November post by Dan Gruhl, a principal engineer in Google AI R&D, and Prashant Nair. The target was FVCOM, the Finite-Volume Community Ocean Model, a coastal ocean simulation of 174,774 lines of Fortran 90 and C across 264 files. The prompt set four rules: no unsafe anywhere, no heap allocations in hot loops, every file under 400 lines with doc-tests, and at least 95% branch coverage with zero numerical difference from the Fortran across 100 random seeds.
Google reports the run took 59 minutes: 11 for the baseline, 3 for the audit and 45 for the port, testing and tuning. It says the agent rewrote the core solver as 13 Rust modules, each under 240 lines, and that on the first test run 36 of 37 unit tests passed. The failure was a single-layer ocean basin that hit a bounds check; the agent added a guard, and all 42 tests then passed with 96.8% branch coverage. In the parity check, Google says all 100 seeds matched to 12 decimal places, a difference of 3.91 × 10-13, on the first attempt.

It also lists six latent bugs it says the port exposed: a mesh builder that wrote past a 50-column limit, a triangle check that multiplied three node IDs in 32-bit precision and overflowed above 1,300 nodes, reads of index 0 on shallow grids, uninitialised values pulled from dry cells, and a seawater-density routine that took the square root of salinity without guarding against a small negative value.

| Stage | Runtime | Speedup | Peak RAM | What changed |
|---|---|---|---|---|
0. Legacy Fortran 90 and C, -O3 | 883 ms | 1.00x | 11.84 MB | Original, with shared global arrays |
| 1. Idiomatic safe Rust | 682 ms | 1.29x | 6.39 MB | No globals, bounds-checked slices |
| 2. Struct-of-arrays, no loop allocations | 548 ms | 1.61x | 5.83 MB | Preallocated workspaces instead of 24 heap allocations per time step |
| 3. LLVM profile-guided optimisation | 469 ms | 1.88x | 5.48 MB | Branch layout and vectorisation, 54% less RAM |
The biggest single step in Google’s account was memory. A 2D Runge-Kutta loop allocated and freed eight temporary arrays 24 times per time step, and moving them into preallocated workspaces took the run from 682 to 548 ms.
What the run does and doesn’t show
Google’s claim is real as far as it goes, and the post is specific about what was done. These are the gaps.

- It ported the core, not the model. Google says “the core of” FVCOM. Thirteen modules of under 240 lines is at most 3,120 lines of Rust, against 174,774 lines of source. Google doesn’t say which parts of FVCOM were left out, and it hasn’t published the port.
- One run, one machine, one workload. The benchmark is a single 883 ms run. The post gives no repeats, spread or hardware, and neither the Fortran compile flags beyond
gfortran -O3nor the Rust build settings are listed in the post. - “Zero difference” became 3.91e-13. The prompt asked for zero difference across 100 seeds. The result is agreement to 12 decimal places. That is excellent for floating-point code, but it isn’t bit-identical, and the post doesn’t say whether the tolerance was set before or after the run.
- The bugs are Google’s account. The six defects are described in the post, but Google doesn’t say it reported them to the FVCOM maintainers, and no issue is linked.
- Speed gains are from restructuring. The jump from 1.61x to 1.88x is profile-guided optimisation, which Fortran compilers can use too. The gain mixes language choice with removing allocations the original code made, so 1.88x isn’t a measure of Rust against Fortran.

The 1.88x figure sits oddly beside Google’s own framing of the work. The post says teams can bring this kind of port forward “in an afternoon”, but the demo was run by Google’s own engineers, on a codebase they chose, using Google’s own tooling.
What “100% safe Rust” means

#![forbid(unsafe_code)] is a compiler lint that rejects any unsafe block in the crate it is set on. That removes a class of memory bugs from the code the agent wrote. It doesn’t cover dependencies, the standard library, or anything the crate calls through a C interface, and it doesn’t say the maths is right. A model can be memory-safe and still wrong.
Real-world ports show where the line falls. In the Copilot runtime port Microsoft counted 158 unsafe blocks, every one at an external boundary: the C ABI, Windows calls, POSIX and libc, SQLite and dynamic library loading. Whether a codebase can live under the lint depends on how much it touches C interfaces and the operating system.
How it compares
The skill sits in a crowded year for Rust migrations. They differ in what they port, what they use as a checker and who is accountable for the result.
| Project | What moved | Checker | Reported result |
|---|---|---|---|
| Google migrate-to-rust (FVCOM) | Core of a Fortran 90 and C model, 174,774 lines of source | 100 seeds against the Fortran binary, within a tolerance | 1.88x faster, 54% less RAM, per Google; port unpublished |
| Google giflib rewrite | About 3,000 lines of C, one-shot with Gemini | Over 30 million real GIFs, with experts reviewing all unsafe code | Drop-in replacement; sandboxing for the C library dropped, tail latency lower |
| DARPA TRACTOR | C to Rust across six performer teams and two baselines | MIT Lincoln Laboratory’s test suite | First report, 13 October 2026, put average failure on correctness at 17.8% |
| Anthropic Messages API | Python service to Rust | Production traffic as the oracle, with agents fixing differences | About 70% less CPU per request, per Anthropic |
| Appwrite | PHP server to Rust, service by service | 5,329 end-to-end tests plus 43,075 recorded cases | 2.6x the requests on the Users API, per Appwrite |
| Spatie Ray 4 | Electron app to a Rust and GPUI app | Parity harness with screenshots and an overnight fix loop | About 194x faster on 10,000 logs; Spatie’s own chart says 213x |
Three things follow. First, Google’s own giflib rewrite is the stronger evidence for the approach: a smaller target, a far bigger test corpus and human review of every unsafe line. The FVCOM run uses 100 seeds. Second, TRACTOR’s evaluators measure failure rates across several teams rather than reporting one best run, and the report describes the baseline tool c2rust as “often producing unsafe and unidiomatic Rust”. Third, Anthropic and Appwrite show a different shape from a skill: engineers built the checker alongside the port and reviewed the fixes.
A benchmark paper called f2x50 shows why Fortran is a harder test than it looks. It gathers 50 public Fortran repositories (12,116 files and about 6.57 million lines) with 561 behavioural probes, and says scientific Fortran has its own problems: array conventions, global state and numerical tolerances. FVCOM is one codebase. Fifty would be a better test of a skill that claims to handle Fortran.
Using it
- Install with
npx skills add google/skillsand pickmigrate-to-rust. In Antigravity, run/migrate-to-rustwith a repository URL. - Read the Stage 0 commands before you approve them, and run the legacy build in a container.
- Write your own tests for the behaviour you care about first. The skill’s parity check compares outputs on seeds; it isn’t a specification.
- Check the final scorecard for unavoidable exceptions the agent documented, and for the
unsafecount it scans for at the end. - Expect cost. The demo ran on Gemini 4 Argon, which Google is doubling in price on 1 December. Google’s post doesn’t give the run’s token use.
Google’s installer lets you choose which agents to configure, but the demo and the one-command route are Antigravity’s.
What’s still open
Google hasn’t said whether it will publish the FVCOM port, the telemetry file from the run or the exact prompt, and Sulat found no independent run of the skill reported. The FVCOM maintainers haven’t commented on the bug list in anything Sulat has found. Until someone else runs it on code Google didn’t pick, the 1.88x figure is a result about one run of one program.
Related: why Bun, GitHub, Ubuntu and Cloudflare moved to Rust, and Google’s Sashiko Linux reviewer.
Sources
- Google skills repository, migrate-to-rust (SKILL.md, version 1.0.0)
- Google Antigravity, “Modernizing 40-year-old scientific code with Gemini 4 Argon”, 3 November 2026
- Miguel Ángel Durán (midudev) on X, 27 November 2026
- FVCOM repository
- Google Bug Hunters, “Scaling Memory Safety”, 24 August 2026
- DARPA, TRACTOR programme
- MIT Lincoln Laboratory, First Test and Evaluation Report for TRACTOR C to Rust Translators
- f2x50: a repository-scale benchmark for Fortran-to-X software migration
- Rust documentation, the unsafe_code lint




