go2cs Roadmap
This page is the plan for what comes next in go2cs: the Go and .NET releases the converted standard library moves to, the platforms it runs on, the real-world Go code it converts beyond the standard library, and the runtime and converter work still ahead. The completed phases are in Roadmap history. Dates are month or quarter targets.
Where things stand. The published release is 1.26.11.1, built from Go 1.26.11
(News). Every implementable package of the converted standard library validates
against Go’s own tests on Windows, on Linux (x64 and Arm64) and on macOS (Intel and Apple silicon).
go2cs -tests -recurse validates third-party modules against their own tests the same way,
and converted modules are published as NuGet packages, listed on nugetgo.net.
Validated Test Packages carries the current state of the standard library, and
Validated Modules that of third-party modules.
What that rests on. Hundreds of Go-versus-C# behavioral test projects guard the converter: each is
transpiled, compiled and compared against a committed expected output, and each runnable one is run and
compared against Go. The whole standard library compiles as .NET assemblies. It reproduces Go built with
-tags purego, since a managed runtime cannot run Go’s hand-written assembly
(Conversion Strategies).
Compiling is not the same as running correctly, which is what Phase 4 is for.
1.26.11.1, and the release after it
In short. 1.26.11.1, built from Go 1.26.11, is the published release. The main line of development carries the work for the next release, 1.26.11.2, which has no date yet: goroutine scheduling, more of cgo, and Native AOT and start-up work.
1.26.11.1 shipped on November 19, 2026, with both of the programs that gated it converting and running as Go
runs them: a modernc.org/sqlite program prints exactly what native Go prints, on Windows and on Linux, and the
converted TypeScript compiler (written in Go) emits what the Go build emits. It also brought go2cs -cgo and
linux-arm64 packages. News has the full list.
On the main line now, for 1.26.11.2:
- goroutine scheduling, many goroutines over a few threads, as an experimental mode that is off unless you build and run for it (Known issues); work on it continues (Performance);
- cgo packages converted with their module, against the
go.*packages, and C memory read through a C struct’s pointer fields (cgo); - a pointer to an unnamed array type made from an
unsafe.Pointerand kept in a variable, which now reaches C memory, as SQLite’s page cache needs; - faster start-up under the JIT for programs that ask many method-set questions (Performance);
- a smaller Native AOT publish of a large program, and a type assertion to
errorthat answers under Native AOT as it does under the JIT (Native AOT and trimming); - among other changes:
GOMAXPROCSfollows Go’s rule,sync.RWMutexis Go’s own code, and more generics under a method-set constraint convert.
Not on the main line yet: handing Go memory to C without a copy, and converting the net resolver with cgo,
are planned for a release after 1.26.11.2 (cgo).
Phase 4: validation against Go’s own tests
In short. Phase 4 checks the converted standard library against Go’s own tests, package by package, so that “it works” is measured and not claimed. It is done on Windows, Linux and macOS, and has one planned extension.
- Phases 4A to 4C are complete. The test pipeline, subtests and parallelism, and the package-by-package validation are done: every implementable package validates on Windows and on Linux, x64 and Arm64 (Roadmap history).
- macOS parity is reached. Every package that applies to macOS validates on Apple silicon and on Intel, each chip compared with Go built for that chip; where the two chips’ counts differ, the roster row shows both. See Platforms.
- Phase 4D is planned. It widens validation to examples, fuzz seed corpora and benchmarks (below).
How the project moves: release hops
In short. go2cs follows Go and .NET one release at a time, and every move proves every package again. Each go2cs release names exactly one Go release and one .NET release.
The project advances by release migrations, called hops: moving the converted standard library (the corpus) to a new Go release or to a new .NET runtime, never both in one hop. Each Go hop re-validates every package against that release’s own tests.
Go releases
In short. The converted standard library is on Go 1.26.11, a release Go supports. The next move is Go 1.27, before the 1.26 series leaves support.
The published packages are 1.26.11.1, from Go 1.26.11 (1.26.11.1, and the release after it). The main line of development carries the current Go line, and the next Go minor is prepared separately until its packages ship. Older Go lines are under Older versions.
| Hop | When | What it involves |
|---|---|---|
| Go 1.27 | Q1 2027, by about February | Generic methods, which need a conversion design first. The 1.26 series leaves support when Go 1.28 ships, around February 2027. |
How often later hops run is decided ahead of the Go 1.27 hop.
.NET
In short. Converted code targets .NET 10, a long-term-support release, until .NET 12. The .NET 10 SDK builds it, a newer SDK builds it too, and neither changes the C# it compiles under.
The published target stays net10.0 until net12.0, the next long-term-support release. .NET 10 is
supported until November 2028.
The C# language version is pinned. Every project, the converter’s template included, fixes
LangVersion, so a newer SDK does not compile converted code under a newer C#. The repository’s own
global.json takes any .NET SDK from 10.0.400 up, newer majors included. On the main line, a converted program
also runs on a newer .NET runtime when no .NET 10 runtime is installed; the go.* packages are validated on
.NET 10.
The converter also escapes Go identifiers that newer C# gives new meaning,
such as closed, union and safe when they name a type.
A .NET 11 measurement stage is planned. .NET 11 shipped in November 2026; the stage never overlaps a Go
hop.
It compares JIT and allocation behavior on .NET 11 over identical code and reviews
the deployment shape, the full-trim publish included (Native AOT and trimming).
Its findings inform the move to net12.0.
Declared host limits and their retirement path
The roster’s host-limit disclosure class, defined in
ValidatedTestPackages.md, covers tests that rest on a property of the test
binary the converted host’s deployment shape lacks. Each entry names that property, never a fixable defect,
and retires itself when the shape gains it: disclosed tests keep running, so an entry that starts passing
breaks the roster’s arithmetic loudly and is removed. The test host publishes as a self-contained, relocatable
single-file executable, so Go tests that copy and relaunch their own binary pass on Windows and Linux.
Entries remain in crypto/tls, os, os/exec and syscall, and the roster’s class text names what each
needs. In crypto/tls’s TestBogoSuite, BoringSSL’s runner starts a converted helper process once per case
inside Go’s own 10-minute deadline, and each converted launch costs many times Go’s (linux-x64), most of it
loading packages. That entry retires when the start-up work under Performance brings the run
inside the deadline.
Native AOT and trimming
In short. You can publish converted Go as a native executable today, and it runs, but the publish compiles every converted package it references in full. This work makes that publish smaller, quicker and free of warnings, in stages.
A converted program, and a C# program that references the go.* packages, can be published with Native
AOT. Done so far:
- Every package registers the Go types it defines. A Native AOT publish runs with the default trim, and the
release check measures it. A fully trimmed build (
TrimModeset tofull) runs (win-x64). reflectworks under Native AOT without generating code at run time: the source generators write the operations it needs at build time. Under a full trim,fmtfinds a value’s ownStringandErrormethods, and reflection reaches a struct’s fields through a pointer.- Reading a slice element and a 64-bit multiply with a 128-bit result inline under Native AOT, as under the JIT.
The first type assertion to an interface a type satisfies without declaring it reads a list written at build
time. A single-file publish compiles ReadyToRun one assembly at a time, and starts several times faster than
the SDK’s compressed composite image (
win-x64). - On the main line since 1.26.11.1: the runtime library’s pointer types share their per-type tables, so a Native
AOT publish of a large program is smaller and the compiler needs less memory for it (
win-x64). A type assertion toerrorthat the method set decides answers as it does under the JIT (Known issues).
Later stages cover method sets and stack frames.
Converted packages are built for the default x64 instruction set: x86-64-v3 gives no gain across the
benchmark suite on win-x64, and an image built that way does not start without AVX2.
The release check publishes a program with Native AOT and runs it on linux-x64, linux-arm64, win-x64 and
osx-arm64.
On osx-x64 the publish is read when it finishes inside the hosted runner’s time limit, and
reported as not measured when it does not.
The cost today is real. With the default trim, Native AOT compiles every go.* assembly a program
references in full, which costs publish time and executable size
(Known issues).
A build, dotnet run and a publish without Native AOT are not affected.
Platforms
In short. go2cs is validated on x64 Windows, on Linux, x64 and Arm64, and on macOS, Intel and Apple silicon. Other platforms are not supported yet.
Windows and Linux. The converter runs on both, and the standard library is multi-target on disk:
platform-shared files sit flat, and a package whose Go source varies by platform keeps one folder per target.
Each platform-varying package ships win-x64,
linux-x64 and linux-arm64 flavors, and roster rows record each Linux flavor’s verdict counts beside the
Windows record. A few Linux operational items remain open.
macOS (Intel and Apple silicon): packages ship for both chips, the behavioral suite passes on both,
and the standard library validates on both: each chip is compared with Go built for that chip, and where
the two chips’ counts differ the roster row shows both. The standard library for macOS is one build, for
darwin/amd64, that serves both chips; on Apple silicon it runs as a native arm64 process
(Known issues).
The two Windows-only packages are the only rows
without a macOS reading. The compile is checked daily in CI on macOS arm64 and x64 runners
(CIMatrix.md).
Other platforms. A build for a platform the packages do not ship is refused, or, on win-arm64, warned
about (Known issues).
Real-world Go modules
In short. Beyond the standard library, go2cs converts third-party Go modules and holds each to the same bar: its own tests must match Go’s. The modules on Validated Modules pass, among them modules whose tests use testify. Two large programs, SQLite and the TypeScript compiler, convert and run as Go runs them.
Each module is converted, validated against its own test suite exactly as a standard-library package is, and
given a proof page beside the conversion. go2cs -tests -recurse runs a module’s tests across all of its
packages, and a validated module packs as one NuGet package.
The validated modules include google/uuid, which brings Go’s v1, v3, v5
and v6 UUIDs to .NET (where System.Guid generates v4 and v7); golang-jwt/jwt
v5, which exercises the converted crypto stack; spf13/cobra with its
dependencies pflag and mousetrap; and itchyny/gojq with
itchyny/timefmt-go, an in-process, fully managed jq. gojq’s
command-line package and its conformance suite come later, once that package’s own dependencies convert.
modernc.org/sqlite and the TypeScript compiler, the two programs that gated 1.26.11.1, are published with their
recipes in sqlite-cs and
typescript-go-cs.
Further modules follow, libraries first: a converted module
is most useful as Go code a .NET program calls. The go2cs Target Atlas is
one input to their selection.
NuGet packages of converted modules
In short. A Go module that someone has already converted can arrive as a NuGet package, so your conversion restores it and does not convert it again. nugetgo.net, the registry that maps Go modules to their packages, lists the published ones.
With -recurse=nuget, a converted program references the standard library, the runtime and the source
generators as published NuGet packages, and the same substitution reaches third-party modules: a dependency
someone has already converted becomes a package restore instead of a local transpile
(Mapping modules to NuGet packages). The converter side is
on by default.
- Package IDs: a converted module publishes as
nugetgo.<dotted module path>; thego.prefix is the converted standard library’s alone. - A package rehearses first, on a local feed, before it reaches nuget.org.
- The package-ID prefixes are not reserved yet. The requests are with NuGet, which has not decided them.
- Packages built from an unsupported Go release are labelled as proofs, and are rebuilt once the converted standard library is on a supported release.
cgo
In short. go2cs -cgo converts a Go package that calls C library functions, on a machine with a C
compiler, alone or with the module it belongs to. Next come publishing cgo packages as NuGet packages, Go memory
handed to C without a copy, and a real standard-library cgo package; C code written inline in the Go file and
callbacks from C into Go follow. Limitations has the detail of what converts and what is
refused.
The standard library is converted with CGO_ENABLED=0.
What converts:
- One package, when every C use it makes is a call of a C function a shared library defines. Integers,
floating-point numbers, pointers, and structs of integers and pointers cross, as do a
void *that is nil or points at C memory, theC.CStringfamily,C.malloc,C.freeanddefer C.f(…). A program that uses it needs only the C library. This shipped in 1.26.11.1. - A converted cgo program printed what the Go build printed on linux/amd64, darwin/amd64, darwin/arm64 and windows/amd64, apart from the differences Limitations lists.
- Without
-cgo, a file the build selects that imports"C"stops the conversion with errorGO2CS2001, which names the file. Test-only and platform-deselected files are skipped as usual.
On the main line since 1.26.11.1:
- With
-recurse -cgo, a module’s cgo packages convert with the module, and with-recurse=nuget -cgothey build against thego.*packages. A conversion is for the machine’s own operating system and architecture, or for another-platformstarget whenCCnames that target’s C compiler. - A cgo module packs as one NuGet package for
win-x64,linux-x64,osx-x64,linux-arm64andosx-arm64, each with its own C binding, and a build or a run on any other platform is refused by name. A real third-party cgo module was packed this way and printed what Go printed on each of the five. Such a package is published only against ago.libthat checks, when the package loads, that its C binding is for the platform it runs on:go.lib1.26.11.1 does not, and 1.26.11.2 does. - C memory can be read and written through a C struct’s pointer field and through a pointer to a C pointer
(
**C.T), as code that walks a list C allocated does.
Next, not on the main line yet:
- Go memory handed to C without a copy, and a pointer to a pointer that C fills in (
&db), the rest of Phase 3. - A real standard-library cgo package, the
netresolver, converted and validated against its own tests as the proof.
Both are planned for a release after 1.26.11.2.
Later: C code written inline in the Go file (Phase 4), then //export and callbacks from C into Go
(Phase 5). Until each lands, it is refused by name.
Phase 4D: examples, fuzz seed corpora and benchmarks
In short. Validation counts Go’s Test functions today. Phase 4D adds the other kinds of test a
Go package carries. It is planned and not yet started.
Phase 4D widens what “validated” covers:
- runnable
Examplefunctions, with their declared output compared; - fuzz seed corpora, run as deterministic tests before any active fuzzing is considered;
- benchmarks, compiled and run for compatibility, with their speed outside the correctness gate.
Active fuzzing, race-detector equivalence and coverage-percentage equivalence stay outside the correctness gate. The design kickoff is planned for Q1 2027, without delaying Phase 5.
Phase 5 — Implement assembly-backed declarations in C#
In short. Phase 5 is about completeness, not speed. A small set of standard-library declarations
has no portable Go body, because Go implements them in assembly, in cgo or inside its runtime. Each
compiles to a stub that throws a NotImplementedException naming it, if it is ever called. Phase 5 gives
each one a real C# body. Making working code faster is under Performance.
What it means for you. No validated package’s tests reach a stub, and a call that does reach one fails loudly and by name. Which exported functions can reach one is measured, on the Go 1.24 standard library, and every call that measurement confirmed reaches a real body.
It proceeds package by package, as validation demands. When a package’s own tests need a declaration,
it gets a hand-written C# body, as os.Executable, the system page size and an arm64 path for
hash/crc32 did for macOS. A measured inventory lists the declarations that still compile against throwing
stubs, per package and per operating system, on the Go 1.24 standard library; no validated package’s tests
reach any of them.
How a declaration gets its implementation.
- The converter keeps the bodyless declaration as a
partialmethod, and a hand-owned companion such as*_impl.cssupplies the body (sync/atomic’sdoc.csanddoc_impl.csare the model). Generated output is never hand-edited, and the stub disappears once the real body is present. - Behaviorally equivalent managed code (
Interlocked,Volatile,BitOperations, spans, BCL crypto) is preferred over instruction-by-instruction translation, keeping Go’s overflow, alignment, memory-ordering, pointer, GC and platform semantics. - Platform implementations are isolated by target and fail clearly on unsupported targets; a generic throwing stub never passes for platform support. Focused behavioral fixtures cover declarations that upstream tests do not reach.
- Compiling is not completion: an implementation counts when the package’s converted tests run against it and match Go, with stress and edge tests where unit tests are not enough.
What closing Phase 5 means: for every supported target, no unexplained throwing stub remains; each implemented member has a real companion or a documented target exclusion; and every applicable package is validated.
What is closed first. A stub an ordinary program can easily reach comes first. The stubs no exported call reaches stay, by name, until a real use needs one; closing those has no date.
Phase 5 is not the “stage 5” of the trimming work; the two numberings are unrelated.
Performance
In short. Converted code is usually slower than Go and uses more memory, and the published comparison says by how much. This section lists the work planned to narrow the gap. None of it holds up anything else on this page.
The performance comparison measures converted C# against Go on the JIT and under Native AOT, on the published 1.26.10.2 packages, and Tuning converted code says which deployment and runtime settings to choose. It is the before picture for the .NET 11 measurement stage.
- Start-up cost of a converted process (in progress). A converted process pays .NET’s process start
and loads its converted packages each time; a converted
crypto/tlshelper takes many times Go’s time to start and run one handshake (linux-x64), most of it loading packages. On the main line, a method-set question at start-up reads only the classes that can answer it, under the JIT; the same gain under Native AOT, and further steps in how converted types find their methods, are planned. This cost also keeps thecrypto/tlshost-limit entry open. - Goroutine scheduling (in progress): by default each live goroutine runs on its own OS thread, so a program can hold only as many goroutines alive at once as the system allows threads, a limit macOS reaches first (Limitations). The main line has an experimental scheduler that runs many goroutines over a few threads, as Go does. It is off unless you build and run for it (Async twins, Known issues), and the work continues on the kinds of blocking it can see.
- Allocations (committed; planned for Q1 2027): the retirement plan named by each deferred allocation-count disclosure on the roster. Go meets those assertions through escape analysis and other compiler optimizations the converted code does not yet reproduce. The work closes the gap by construction (storage for Go array values, frame-local allocations kept off the heap, ref-receiver method emission), and each disclosure retires when its assertion matches. Its design, stack-allocation parity, is written.
- Interface conversions (unscheduled): the remaining interface-shell caching items, a per-value shell-cache experiment and a base-class marker; a converter-emitted per-call-site inline cache stays deferred.
- Stack strings: the two remaining increments below, unscheduled.
Expand the sstring stack-string MVP: the remaining increments
A non-escaping string([]byte) conversion emits a zero-copy sstring view instead of a heap copy:
for a named local, a comparison or switch operand, a concatenation operand, and a repeated conversion
hoisted to one view
(strings reference;
the completed increments are in
Roadmap history).
Two increments remain:
- Non-retaining callee arguments.
string(x)passed to a callee that never retains it, such asstrconv.ParseUint(string(s), …). A@stringparameter copies the view back at the boundary, so this pays only where the callee accepts a view (ansstringtwin gives a registered function that overload), and it needs a curated list of non-retaining callees. - A positional, loop-carried liveness guard. Relax “the source is never written” to “the source is
not written between the conversion and the local’s last read, and is not loop-shared”. This is the
only increment that reaches the
PerfStringhot loop and the one with the highest silent risk, so it gets the heaviest adversarial pass.
Why widening is safe to try. sstring is a ref struct, so the .NET compiler rejects almost
every over-reach (storing it in a field, array or map, boxing it, sending it on a channel, capturing
it in a closure) at build time. The only silently-wrong vectors are escape through return and
mutation of the source buffer during the view’s lifetime, and both stay explicitly guarded. Each
increment extends the SStringElision behavioral test, inspects every newly emitted site in a full
standard-library reconvert, and re-runs the performance suite.
Not pursued: for range string(x), which has no standard-library sites; and m[string(x)] map
keys, where a zero-allocation lookup would need a custom comparer that slows every @string-keyed map.
IDE mode (an experiment)
A gated experiment in writing Go in an editor and running and debugging it as .NET, with the debugger showing Go values the way a Go developer expects. Its feasibility is tested first, and nothing in it is a commitment yet.
Open converter items
In short. Known, smaller gaps in the converter, none of them scheduled. The validated standard library and modules convert despite them; one matters to you only if your code uses that construct.
The first is described in Limitations;
the rest are tracked in src/go2cs/ToDo.md:
- The address of another package’s pointer- or interface-typed variable, such as
&otherpkg.ErrMissing, or of a variable whose storage lives somewhere else, such asruntime.MemProfileRate, points at a copy, so writes through it are lost (Known issues gives the workaround). - The remaining dynamic-struct implicit-cast checks in the
AssignStmt,CompositeLit,IndexExpr,BinaryExpr,UnaryExpr,SelectorExpr,TypeSwitchStmtandValueSpecvisitors. - Complete comment conversion, free-floating comments included, which depends on golang/go#20744 or the DST package.
- Go assembler (
.s) targets. One idea is to compile them to object code and wrap it as a native library; the standard library’s pure-Go paths cover the need in the meantime. - Accessibility “publicizing” as a source-generator pass, a cosmetic change.
Timeline
In short. The order the work on this page is planned in. Few rows carry a date; most wait on something else finishing first.
| When | Planned |
|---|---|
| Now | On the main line, for 1.26.11.2: goroutine scheduling, cgo packages built with their module and against the go.* packages, the trimming work for Native AOT, and the start-up cost of a converted process (1.26.11.1, and the release after it). |
| Next | Publishing cgo packages, once a go.lib with the load-time platform check is published. Go memory handed to C without a copy, and the net resolver converted with cgo. The .NET 11 measurement stage. The generic-methods design for Go 1.27. The decision on how often later hops run. |
| Q1 2027 | Go 1.27 hop, by about February. The Phase 4D design kickoff. The allocation work, whose design is written. |
| Unscheduled | Inline C and callbacks from C (cgo Phases 4 and 5). The Phase 5 stubs that no exported call reaches, each closed when a real use needs it. Interface-conversion performance work. The remaining stack-string increments. Open converter items. |
How progress is tracked
In short. Where to check each claim on this page for yourself.
| What | Where |
|---|---|
| Validation | Validated Test Packages, the authoritative roster: each package’s verdict counts on Windows, Linux and macOS, its disclosures with their stated reasons, and its proof page. Its header carries the current totals. |
| Third-party modules | Validated Modules: each validated module, its version, the platforms it was measured on, and its proof pages. |
| Compilation | The whole converted standard library builds with zero errors (src/go2cs-stdlib.slnx) for Windows and Linux; the macOS compile runs daily in CI (CIMatrix.md). |
| The converter | Hundreds of Go-vs-C# behavioral projects under src/tests/Behavioral, each transpiled, compiled, compared against a committed golden and, where it is a runnable program, output-compared against Go. |
| Performance | The performance comparison. |
| Releases | News. |
Every converter change runs the same loop: edit src/go2cs/*.go → go build (with the Go release
src/go2cs/go.mod names) →
re-transpile → dotnet build, and a whole-corpus reconvert shows no unintended drift before the change
lands.
Older versions
Go 1.24 and Go 1.25. Go 1.24 and 1.25 have no further releases: packages built from either carry none of the Go security fixes issued since.