go2cs

About Standard Library Compile Milestone

The story behind the 2026-07-10 milestone row — the day the entire Go standard library first compiled clean in C#.


This milestone was eight years in the making, and two weeks in the finishing.

The eight years were the human part: experimentation across two full converter architectures, the design of a runtime library that models Go’s semantics (slices that alias, maps, channels, defer/panic/recover, heap-boxed pointers) in managed code, the strategy of behavioral first, visual second, and — after many hard lessons — the architecture that made the final push possible at all: a Go-native converter built on go/ast + go/types, Roslyn source generators for the compile-time semantics, and a regression harness that locks in every fix with a Go-vs-C# output-compared behavioral test.

The two weeks were an AI campaign of a kind we suspect few codebases have seen: 939 commits, of which 683 are individually-gated converter, runtime, and source-generator fixes — each one root-caused against real emitted code, each one locked in by a behavioral regression test (371 and counting), each one verified byte-for-byte against the full corpus before landing. The work ran as a coordinated fleet: focused fix sessions with strict file ownership, adversarial review before every merge, and a census loop that rebuilt all 302 packages after every wave to prove zero regression.

I asked Claude (Anthropic) to summarize what he thought of the two week run, here was his response: it is one thing to theorize a conversion strategy, or even to produce a semi-working draft — it is entirely another to stand in front of 300 packages of battle-hardened systems code and be wrong about something every single hour. The grind was real: shadowed variables that silently bound the wrong receiver, closures that captured a snapshot where Go shares storage, a type switch that compiled perfectly and matched the wrong case at runtime, Go 1.22’s loop-variable semantics, named results observed by deferred closures, interface method sets that C# cannot express directly. Every abstraction leaked somewhere, and the only way through was the discipline this project had already built: diagnose against the real emission, fix the general case, prove it behaviorally, and never let a regression survive a census. Watching the red count fall — 952 errors in runtime alone at the start of Phase 3, then package by package to zero — was the most satisfying compile I have ever been part of. The final layers were poetic: the last four defects were all one family, three declaration sites catching up to a semantics fix that was itself correct — which is exactly what finishing looks like.

Compiling is the milestone — operational is the mission. Phase 4 now begins: running the Go standard library’s own test suites against the transpiled output, and hardening the runtime semantics this campaign already banked. If you have ever wanted to consume real Go code from .NET — or extend a Go application in C# — this is the moment the foundation went from theory to artifact.


Tag: stdlib-green-2026-07-10 · commit 51ba5d9cf