đź“° go2cs News Archive

go2cs

All project announcements, newest first. The README summarizes where the project stands today; every announcement is recorded here, and the detail-heavy ones link to a companion page carrying their full text.


December XX, 2026 — Packages initialize in Go’s order, deadlocks stop as in Go, and code that reads closer to Go

NuGet 1.26.11.2. The fifth release on the Go 1.26 line makes converted programs behave more like Go’s. A converted program now initializes its packages in Go’s order before main runs, and a program whose goroutines are all blocked stops with Go’s all goroutines are asleep - deadlock! instead of hanging. Many programs that compiled but computed something different from Go now compute what Go computes: copies of arrays, addresses of fields reached through pointers, constant arithmetic and the order Go evaluates a statement in. Generic code that Go programs commonly write converts, go2cs -cgo builds a package’s own C code and converts with the rest of a module, and converted C# reads closer to the Go it came from. As an experiment, goroutines can also run on a small pool of threads, as Go runs them, through async twins; it is off unless a program is built and run for it. The full text, and every change merge by merge, is on the companion page. Code compiled against an earlier release must be rebuilt: see Upgrading from an earlier release, near the end.

What changed.

Converting and testing modules.

The go2cs tool.

Known issues.

Documentation. A page answers Did AI write this?, Async twins explains the experimental scheduler, and Command line explains every option.

Upgrading from an earlier release. Few projects compile against go2cs’s packages yet, so most readers can skip this section. Each change below is described in full on the companion page.


November 19, 2026 — Go 1.26.11, cgo conversion, linux-arm64 packages, and TypeScript’s compiler and SQLite in C#

NuGet 1.26.11.1. The fourth release on the Go 1.26 line converts the standard library from Go 1.26.11, a patch release with security fixes; go2cs -cgo now converts a package that calls C; the go.* packages ship a linux-arm64 build; Microsoft’s TypeScript compiler, written in Go, converts, compiles and type-checks; and a modernc.org/sqlite program that writes and reads a database file prints exactly what native Go prints, on Windows and on Linux.

For any code that happened to be compiled against 1.26.10.3 (minimal exposure expected for this at the moment), some of the changes below may break compiled assemblies, e.g., C# source that reaches a Go method through the package class or through using static alone, or that writes a name with a Δ prefix. They are listed under Upgrading from 1.26.10.3, and a build that would hit one of the binary breaks now stops with an error that names the package (GO2CS3002).

The standard library is converted from Go 1.26.11, a Go patch release with security fixes. The converted packages that change are net/http (its server and transfer code), net (its dialer), crypto/rsa and the FIPS 140 module, on every converted platform. Go 1.26.11’s other fixes are in cgo, the go command, the compiler and the linker, which have no converted counterpart. The go2cs tool, which downloads its own Go on first use, now downloads Go 1.26.11. Every validated test package whose converted code moved was run again at Go 1.26.11 and validated there. Each standard-library package’s README now leads its badges with a “converted by go2cs” badge.

Upgrading from 1.26.10.3.

The build now checks every go2cs-built package it uses against the break floor. The break floor is the newest go.* release that changed members that compiled code binds; at this release it is 1.26.11.1. The check runs before the C# compiler. A go.* package counts as its own version. A nugetgo.* package counts as the release its go2cs/source-metadata.txt names, and as below the floor when it ships no such file. Each package below the floor is error GO2CS3002, naming the package and the release it was built on, and one more error stops the build before it compiles anything, where such a package used to restore cleanly and then fail at run time with MissingMethodException. To build anyway and accept that risk, set <GoAllowBelowBreakFloor>true</GoAllowBelowBreakFloor>: each error becomes a warning. The check arrives with go.lib 1.26.11.1, so a project whose go.lib is 1.26.10.3 or older is not checked. A module packed some other way, under an ID that does not start with nugetgo., is not checked either. See The break floor.

A package whose types promote very many methods now loads. The .NET runtime loads no type with more than 65,521 methods. A converted package class held every promoted-method forwarder of every struct in the package, so a package where many structs embed one method-rich base could pass that limit: it compiled, and its first use threw TypeLoadException. With each struct’s forwarders in a class of their own, the package class holds only what the package declares. A type that would still exceed the limit is now a compile error, GO2CS0012, which names the type and its method count.

A promoted method that returns a string, a bool or several values can be called from another package. A Go struct that embeds an exported struct promotes its methods, and code in another package may call them on the outer struct. The C# forwarder for such a method was internal whenever its return type’s C# spelling ended in a lowercase name (@string, bool, error, any multi-value return), so a call that Go accepts did not compile in the converted program (CS1929). The forwarder of an exported method is now public unless its signature names a type that is not public. In the standard library 268 forwarders in 12 packages became public, bufio.ReadWriter’s Read and Peek among them; none was removed, so nothing compiled against 1.26.10.3 breaks on this change.

A method whose receiver type is written through an alias runs on a nil pointer, as in Go. Go accepts type AttrNode = Node with func (n *AttrNode) Mode() int, and the method is Node’s: it can be called on a nil pointer and test n == nil itself. The converter took such a method’s receiver by reference, so the nil test read the struct through the nil pointer and the call panicked where Go returns; a method that used the receiver as a pointer in any other way did not compile. Such a method is now emitted as it is when the receiver is written with the type’s own name. The standard library has no such method, so its converted code is unchanged. A receiver that is an alias of the pointer type itself (type P = *T) still does not compile after conversion.

Converting a module picks a library’s pure-Go code over its assembly. go2cs -recurse, in every form (local references, -recurse=module and -recurse=nuget), now builds a module with the build tags safe, purego and noasm, where it used safe alone, and prints them at the start of the run. A library that ships hand-written assembly behind !purego or !noasm now converts its pure-Go version instead of methods that throw when called. github.com/klauspost/cpuid/v2 is the case that prompted it: it ran its assembly CPU detection as the package loaded, so every converted program that imported it, github.com/zeebo/xxh3 among them, stopped at startup. With noasm it uses its pure-Go detection. An explicit -tags still replaces the default entirely, and -module-safe-tag=false drops all three tags. None of the nine published nugetgo packages selects a different file under the new tags, so none needs a rebuild for this change. See Build tags for a module.

A known limit: no tag removes assembly that a library gates on the architecture alone. Its declarations still convert to methods that throw, and they stay reachable through code that forces the fast path on. xxh3’s vector routines are the case: hashing takes the portable path, because the converted cpuid reports no CPU features, but xxh3’s own tests switch the vector paths on and reach the throwing methods.

A converted program’s main now has the stack Go gives it. Go’s main goroutine grows its stack to 1 GB, so deep recursion in main is ordinary Go. A converted program used to run main on the process’s startup thread, whose stack is the operating system’s default (1 MiB on Windows, usually 8 MiB on linux and macOS), and a deep recursion there ended the process with Stack overflow. where Go printed its result. main now runs as the main goroutine on a thread that reserves 1 GiB. The converted-test host runs TestMain the same way, as Go runs it on the main goroutine. The cost is one extra thread at start-up: under half a millisecond on linux and Windows, and a few milliseconds on macOS hosted runners, where thread creation is slower and more variable.

Visible change: func main keeps its name in converted code. It used to become C#’s Main; it is now main, like every other Go function, and the C# entry point Main is generated beside it. Every converted program’s main.cs changes in that one line when it is converted again. A program converted by an earlier release still builds: the generator adds nothing when a Main is already declared. One Go rule wins over the stack: when an init function calls runtime.LockOSThread, main runs on the startup thread, as Go runs it there, and keeps that thread’s stack. The main package’s own init functions also still run on the startup thread. See Limitations.

Some code instead of none: go2cs -warn. A package that holds a site the converter refuses used to produce no code at all. -warn <code> now downgrades the listed refusal to a warning, so the package converts and everything but the refused site runs. It is opt-in per code and never a default, and a code is allowed only when every site it covers fails loud when reached: the converted program panics there with the refusal text, rather than running on with a silently wrong result. Today that is GO2CS2002, a generic instantiation whose self-referential constraint has a method that cannot be forwarded (for example Tree.Children returning []N). Each downgraded site is printed as warning GO2CS2002, and every C# build of the project reports it again as the new GO2CS0011, so a project that is never converted again still shows that it carries a known-broken path. See -warn and diagnostic codes.

-recurse converts the rest of a module when one package is refused. One package the converter refused (a GO2CS2001, GO2CS2002, GO2CS2003, GO2CS2005 or GO2CS2006 error) used to end a -recurse run, so every package queued after it went unconverted. Now the refused package is skipped: its diagnostics still print as errors and it gets no project, but every other package converts. The run still ends with exit 1, naming each refused package and each converted package that imports one, since those will not build until the refused package converts. A package that fails to convert (it does not load, or the converter panics) was already skipped, but the run used to exit 0; it now exits 1 too, so a script that checks the exit code sees it. A single-package conversion still stops at a refusal and writes nothing. -tests -recurse goes on past a refusal too, as go test ./... goes on past a package that does not build: each tested package that the refused package does not reach is converted and tested, and each one it does reach is named, with its reason, in the run’s output (and in MODULE.md, on a run that writes one). See -recurse.

A refusal is renumbered: GO2CS2005. The refusals for a pointer type argument to a generic with a non-self-referential method-set constraint (new in 1.26.11.1, alongside the conversions that now work for that shape) are reported as GO2CS2005 instead of GO2CS2002. Their sites cannot fail loud if downgraded, so -warn does not accept GO2CS2005. A build script that matched GO2CS2002 for those sites should match GO2CS2005.

A new refusal: GO2CS2006. A generic call that passes a []*T where the callee declares []N (N constrained by a method-set interface) is converted by copying the slice element by element, so a callee that writes the slice (assigns an element, appends into it, sorts it, or hands it to something that does) wrote the copy, and the caller never saw the change, with no diagnostic. go2cs now refuses such a call by name, naming the callee’s first write, and converts it as before when the callee only reads the slice. No standard-library package is refused. -warn does not accept GO2CS2006, since a downgraded site would run on silently wrong. See diagnostic codes.

cgo converts more of what real programs write. Under -cgo, C.CString, C.CBytes, C.GoString, C.GoStringN, C.GoBytes, C.malloc and C.free now convert, a void * crosses when it is nil or points at C memory, and defer C.f(…) converts. The helpers copy bytes, with no text encoding in between, and what C.CString returns comes from the package’s own malloc, so the package’s own C.free frees it. go2cs still hands C no pointer into Go memory: a pointer into a slice or an array is refused when the package is converted, and unsafe.Pointer(&x) is refused when the call runs, each by name. Each of these was run against the Go build of the same program on linux/amd64, darwin/amd64, darwin/arm64 and windows/amd64. Every arm printed what Go printed, or, where it hands C Go memory, was refused by name. A -cgo conversion is one package, and it builds against a go2cs clone (dotnet build -p:go2csPath=<go2cs>/src/); it does not use the go.* packages yet. Building a cgo package against the go.* packages from the feed is planned for the next release.

A pointer rebuilt from a number is refused too, with a narrow memory-safety gap left. go2cs refuses, by name, any address inside Go memory that it is holding still, even after the address has been through a uintptr: u := uintptr(unsafe.Pointer(p)) followed by C.f(unsafe.Pointer(u + n)), the reversed sum unsafe.Pointer(n + uintptr(unsafe.Pointer(p))), and Go’s own one-expression form, which converts to unsafe.Add. Three cases still cross, because go2cs is no longer holding the memory, or never was. In each, the call goes ahead, and the memory may move while C is using it: a number kept after the last use of the pointer it came from, which Go’s own rules already forbid; a number taken inside a method with a pointer receiver, from a pointer of the receiver’s own type; and Go memory held still before the program’s first cgo package was loaded. A program that needs this memory-safety guarantee should avoid those three. See Limitations.

*(*F)(e) = fn, a func stored through an unsafe.Pointer, now stores what the target can hold. Code translated from C by ccgo fills a table of C function pointers this way, at a computed address (*(*func(…) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&table)) + 8)) = fn). The store wrote a managed reference into the table’s memory before, and the number read back from the table named no func. It now stores the func’s word where the target is a word, and the func itself where the target is a func variable or a func field. A target that is neither panics by name. The standard library has no such store. See Pointers.

unsafe.Add over a nil pointer now answers the offset, as Go does. unsafe.Add(nil, n) is the address n; it answered nil before. Pointer arithmetic written in one expression, unsafe.Pointer(uintptr(p) + n), converts to the same call, so it gives the same answer over a nil p. A program that compared such a result with nil sees a non-nil pointer now. No call site in the standard library does. See Pointers.

(*[N]T)(p)[lo:hi] over an unsafe.Pointer is now a view of the memory p names, as in Go. The slice was a copy before, so a write through it never reached the memory. Code translated from C reaches memory this way throughout: modernc.org/libc’s memcpy is copy((*RawMem)(unsafe.Pointer(dest))[:n:n], …), and with a copy as its destination it copied nothing. The converted code now calls @unsafe.Pointer.View, and copy over an open form (copy((*RawMem)(p)[:], src)) calls @unsafe.Pointer.CopyInto or CopyFrom. A view of C memory aliases it. So does a view of a Go array or slice of the same element type, and a view of any other Go value that holds no reference (a number, a struct of numbers, an array of another element type): the value is pinned and the view keeps it in place. A Go value that holds a reference is still viewed as a copy. What a program can see change:

The open form of an unnamed array type, (*[N]T)(p)[lo:], takes the same view, and copy into or out of it the same calls. It took them only when the array type was named: over an unnamed one it read the whole array as a value, so over memory that holds no Go array of that type it had length 0, and as copy’s destination over the bytes of a number it ended the process.

In the standard library 13 lines in four files of runtime take the new form, and the open form of an unnamed array five more, in reflect, internal/reflectlite and runtime. See Pointers.

An index, an element’s address or the whole array through (*A)(p) reaches the memory as well. (*A)(p)[i] (a read, a store, a compound assignment or ++), &(*A)(p)[i], *(*A)(p) and *(*A)(p) = v now go to the memory p names without making a box of the whole array, so an indexed loop over C memory allocates nothing. modernc.org/libc writes a string’s terminator this way ((*RawMem)(unsafe.Pointer(p))[len(wd)] = 0), and sqlite indexes small unnamed arrays the same way. In the standard library 45 lines take the new form, nearly all of them in runtime’s memory allocator. A named array type that holds references, read as a whole value from memory that cannot hold it, now panics by name at that read. It used to store a managed reference into that memory, and nothing reported it. See Pointers.

A view of one field’s bytes over an ordinary Go struct now reads and writes the field, as in Go. Go code reads the two bytes of a port, or the halves of a 64-bit word, with (*[2]byte)(unsafe.Pointer(&h.port))[1]. Over a Go struct holding no reference, only len of such a view was right: an index panicked with “index out of range with length 0” or a nil dereference, and a range by value over it read zeros where Go read the field, with no error. Now the view indexes the field in place (a read, a store, a compound assignment and ++), and the whole array through it works as Go’s *p does: *p read as a value is a copy, *p = v stores in place, p[lo:hi] is a slice of the field, and a range over p reads each element when its round comes, while a range over *p ranges a copy.

The view also works over a struct that holds a string, a slice, a map, an interface or a pointer, which is where golang.org/x/sys reads a socket address (unix on linux and macOS, windows on Windows), and through a chain of field selections from a variable (&sa.raw.port). Over such a struct the index, the whole-array load and store, len and a range that takes only the index work; a slice of the view, the address of one of its elements and a range by value are refused by name, and so is a tuple assignment that stores the whole array through two views at once. One related form can end the process: a slice taken where it is written, (*[N]E)(unsafe.Pointer(&x.f))[:], over a promoted field, a slice element’s field or a call’s result (Limitations). See Pointers.

A write through the address of a named array type reaches the array, also before the program has used it. For type small [8]byte, var local small; fill(unsafe.Pointer(&local), 41) left local[0] at 0, where Go prints 41. The same write was lost through a package variable, a struct field, new(small), and the address converted to a uintptr or to a raw pointer, and so was a memcpy from libc into a fresh named array. It reaches the array now, and a first use of the array on one goroutine racing another’s first use of its address no longer loses writes either. No line of the converted standard library changes; the fix is in golib. See Pointers.

a = b for an array now copies b’s elements into a, as Go does, so a slice of a, a pointer to one of its elements, or a’s address taken before the assignment sees the new values. The converted code gave a a new array, so everything taken from a beforehand still named the old one: a read through it saw the old values, and a write through it was lost. The same holds now for a field, a package variable, *p = b, a struct that holds arrays, a multiple assignment, a range that assigns with = and a select that receives into an existing variable. A conversion between array types, x := [4]int(n), now copies n, where it shared n’s array. A store into a map element still copies, because a map element is a value in Go. In the standard library 70 converted files change across the four targets, each at such an assignment.

A copy of a struct copies an array the struct reaches through an embedded struct, and a conversion copies its operand, as in Go. A struct that held an array only through an embedded struct was copied without its array, so the copy and the original shared it, and a write through one showed in the other. A conversion between struct types, T(v), built its result from v’s fields, so an array field, or a nested struct holding one, was shared with v the same way. Both now copy. A conversion copies once, where its result is stored or passed, and not where it is only read. See Struct types.

copy and append copy an array element’s value. A slice whose elements are arrays ([][4]byte), or structs that hold one, kept one inner array for two slices after copy(dst, src) or append(dst, src...): a write through src[0] showed in dst[0]. Each element is now copied as Go copies it. A copy into an existing slice adds no allocation; an append that grows the slice allocates once for each such element it moves, where Go allocates none.

A Go pointer, func, interface or unsafe.Pointer read or written whole through a pointer into native memory is refused by name. For *p, where p points into memory from C or the operating system and the value is one of those types, the converted code took the memory’s word for a managed reference: a read produced a reference to an object that does not exist, and a write stored a reference where the garbage collector cannot see it. Both now panic, naming the type. An unsafe.Pointer over memory Go allocated still reads and writes as before. golib’s maps, channels, strings, slices and arrays are not affected.

A pointer made inside a Go value now keeps that value alive and in place. Go lets a program point into the middle of a variable, a struct or a slice’s array with unsafe: (*T)(unsafe.Add(unsafe.Pointer(p), off)), or in one expression, (*T)(unsafe.Pointer(uintptr(unsafe.Pointer(p)) + off)). In Go that pointer keeps the memory alive. Converted code turned it into a number on its way to *T, and a number keeps nothing: the new pointer held no reference to the value and did not stop the .NET garbage collector from moving it. Once nothing else referred to the value, a write through the derived pointer went to memory the collector had already reused (a probe on linux/amd64 read 0 where Go reads 22), and after the collector compacted the heap a read returned the old bytes from the old address. This is plain Go, with no cgo involved, and nothing reported it.

Now (*T)(p) over an unsafe.Pointer converts to unsafe.Pointer.To<T>(p), which receives the pointer itself, and pointer arithmetic written in one expression converts to unsafe.Add(p, n), which moves the pointer and keeps what it pointed into. A method that does this arithmetic on its own pointer receiver passes on the receiver itself. An array field reached through such a pointer, and a slice over it, keep the value too. In the standard library the one reached site of this shape is syscall.UnixRights and UnixCredentials on linux and macOS; three stress runs of 300,000 messages each on linux/amd64 never caught it failing, and it is closed by the same rule.

A pointer returned from a function keeps it too. A function that returns an unsafe.Pointer, such as return unsafe.Add(unsafe.Pointer(&b[0]), 4), had its result turned into a number at every call. On windows/amd64 a program that wrote through such pointers after a garbage collection missed the slice, and the stray writes corrupted the .NET heap: the program died with Fatal error. Internal CLR error. (0x80131506). The call’s result is now used as it is. The standard library’s calls of this kind, most of them in runtime, internal/runtime/maps and reflect, changed with it.

What you need to do. Convert your own code again. The standard library in the 1.26.11.1 packages already carries the new forms. Code converted by an earlier go2cs still builds against the new packages, but it keeps the old conversion, and with it the hole.

Limits. A pointer rebuilt from a uintptr kept in a variable (u := uintptr(p), later unsafe.Pointer(u + n)) still keeps nothing, as Go’s own rules say of it. So do a sum whose first term is not the pointer and a rounded or masked address. A typed pointer made by arithmetic is not equal to the field’s own address ((*int64)(unsafe.Add(unsafe.Pointer(&p), 8)) == &p.y is false, where Go says true). One cost: a method that does pointer arithmetic on its receiver pays for keeping the value at each call. On linux/amd64 that is 6% to 20% in the standard library’s own shape, and nearly twice the time when the receiver is a field of another struct, which no standard-library caller does. See Pointers.

The go.* packages now ship a linux-arm64 build of the standard library. Through 1.26.10.3 they shipped win-x64, linux-x64, osx-x64 and osx-arm64, and a program built for linux-arm64 compiled against, and ran, the Windows build of every package whose code differs by platform, with no error. Each such package now carries a fifth folder, runtimes/linux-arm64/, converted from Go for linux/arm64. It calls the kernel with arm64’s own system-call numbers and structure layouts, and reads the processor’s features from the kernel as Go does. A project built with -r linux-arm64, or on an arm64 Linux host, uses it with no change. Go’s own tests for every package on the validated roster that runs on Linux were run on GitHub’s hosted Arm runner (ubuntu-24.04-arm), and every one is validated there as well as on linux-x64. go2cs -stdlib accepts linux/arm64 as a fourth -platforms target.

A known limit: 15 internal standard-library members that Go writes in arm64 assembly have no managed body yet and throw when called. A program reaches one only through a standard-library path. See Known issues.

Every package that applies to macOS is validated on Intel and on Apple silicon. 1.26.10.3 validated 229 of the 236 packages that apply to macOS. In 1.26.11.1 all 236 are validated on Apple silicon (osx-arm64) and on Intel (osx-x64), each chip compared with Go built for that chip, with one exception: runtime’s Intel reading is the one 1.26.10.3 banked, because at 1.26.11.1 it read below its count twice, for two different causes. Its Apple-silicon reading is this release’s. See the macOS line in Validated test packages.

A build for a platform the go.* packages do not ship now says so, instead of running the Windows build. On another operating system, or on Linux with another architecture (linux-riscv64, for one), the build stops with the new error GO2CS3003, naming the platform and the first package that has no build for it. On win-arm64 it warns, GO2CS3004: the Windows build is that operating system’s own, so the program runs. A build that only needs to compile, and knowingly wants the Windows build, passes -p:GoAllowReferenceFlavor=true on the command line. A portable app built on one platform and run on another, such as a linux-x64 build run on linux-arm64, prints a warning on standard error at start-up.

Two linux-x64 builds now pick the linux-x64 build. Alpine (linux-musl-x64) compiled against the Windows build, and failed to compile. A build with no RID on Ubuntu’s packaged .NET SDK, which reports ubuntu.24.04-x64 as its own platform, also compiled against the Windows build, with no error. Both now resolve to linux-x64, as .NET does at run time. Measured with SDK 10.0.403 and Ubuntu’s 10.0.112 against go.* 1.26.10.3 from nuget.org. See Known issues and diagnostic codes.

A new page says which names C# code can rely on. What go2cs promises to C# code that uses it sorts every name a C# consumer sees into three tiers. Frozen: the exported surface of Go packages that are not internal or vendor, the type mapping, golib’s consumer API (slice<T>, map<K, V>, @string, ж<T>, builtin and the rest), PanicException and GoErrorException, package IDs and the version scheme. Stable within a Go minor release, and changed only when the break floor moves: generated plumbing and the golib API that converted code calls. No promise: Go internal and vendor packages, tuple element names, and which thread runs a goroutine. The page also lists the consumer MSBuild properties and the one path by which a promised name may change.

IntelliSense hides the plumbing. golib’s types outside the consumer API, and the plumbing go2cs-gen generates (interface adapters, _package_asserts classes, promoted-method host classes and the like), now carry [EditorBrowsable(Never)], so completion lists show the Go names. Nothing is renamed or removed, so code that names one of them still compiles. Go internal packages are not marked yet, and no build warning names a use of one.

go2cs -cgo now converts a cgo package. Through 1.26.10.3 the flag did nothing and a package that imports "C" was refused. Now, on a machine with a C compiler, -cgo converts one package when every C use it makes is a call of a C function that a shared library defines. Integers, floating-point numbers and pointers cross as arguments and results. A struct of integers and pointers passes by value, and one struct or one scalar passes by pointer: C gets a copy for the call, and the copy is written back after it. A function that sets errno can be called in Go’s two-result form, n, err := C.f(…). The package’s C types, typedefs and constants convert with it, and the converted C# reaches them as C.<name>, as Go does. Anything else is refused by name, before anything is written, with the phase that will cover it: C variables, a C function used as a value, a function the preamble itself defines, //export, and a function the C compiler inlines or a header renames (abs and labs everywhere), among others. The cgo package must be converted on its own: -cgo does not combine with -recurse, -tests or -stdlib. See Limitations and -cgo.

What you need, and where it runs. go2cs does not provide a C compiler. It uses the one Go’s own cgo build would use, go env CC, and converts for that machine’s own operating system and architecture only. On Windows use llvm-mingw or MinGW-w64 gcc: under zig, Windows links C runtime functions such as cos and exp statically, so no library exports them and go2cs refuses those calls by name. A program that uses the converted package needs no C compiler, only the C library it was converted against. Each library loads by the name captured at conversion (for example libc.so.6 on Linux, /usr/lib/libSystem.B.dylib on macOS) from where Go’s own loader would look, and never from the current directory. A build of the package for another target is refused by name, and on another operating system or architecture the converted package refuses to call C, naming both. A converted cgo program was built and run against the Go build of the same program on linux/amd64, darwin/amd64, darwin/arm64 and windows/amd64, converted with zig on Linux and macOS and with llvm-mingw on Windows. Every check printed what Go printed, apart from the differences Limitations lists, all of them in programs that break cgo’s pointer rules.

Two fixes reach code that never uses -cgo. A package whose Go files all need cgo used to convert to nothing and exit 0; it is now refused with GO2CS2001, naming the cause. And when a package loads with cgo on (under -cgo, or with CGO_ENABLED=1 set), a plain Go file under //go:build cgo now converts; it used to be dropped with exit 0.

A converted module that reads a struct out of memory laid out by Go, or reinterprets one through unsafe.Pointer, now gets Go’s bytes when the struct holds arrays. go2cs held every Go array field as golib’s array<T>, a managed reference, so reading such a struct whole from Go-laid-out memory was refused by name at run time. Code that ccgo translated from C, such as modernc.org/sqlite and its libc, does this throughout. Now a struct that its own package converts whole through unsafe.Pointer is laid out at Go’s offsets and size, with each array field a fixed-size inline array (array8<byte> for a [8]byte), and so is every struct it holds by value. The inline arrays come from go.arrays.dll, a new assembly in the go.lib package beside golib.dll, which a program loads only when it uses one. Indexing, len, range and printing such a field work as in Go. The standard library is never laid out this way, so its converted code is unchanged.

For a module, the rule is automatic, and -inline-arrays <pattern> forces packages on, or -<pattern> off; -inline-arrays <import path>#<TypeName> selects one type in its own package, for a type that another package lays out at Go’s bytes and passes back by value. A type the rule picks but cannot hold inline (an array or struct over 4096 bytes, an array field sliced or addressed, a struct from another package) converts as before, with warning GO2CS2009. Error GO2CS2010 refuses a reinterpret between two structs whose arrays disagree, inline on one side and not on the other, when the packages are forced or the inline side belongs to another package. A known limit: reflection over a struct that holds inline arrays, fmt.Printf("%v", s) among it, panics by name. Print the fields one at a time. A slice of an array held inline panics by name when the struct around it also holds a string, a slice, a map, an interface or a pointer; a copy into or out of the array with constant bounds works, and so does slicing a local copy of the array. See -inline-arrays, Limitations and diagnostic codes.

A struct the rule does not hold inline can still be copied out of such memory: x := *p decodes its bytes at Go’s offsets into a new value, arrays and arrays of arrays of numbers included, where it was refused by name. A struct that holds any other reference is refused by name, naming the field. A zero-length array field ([0]T, which C translations use for a trailing array) no longer counts against the struct’s size checks. A whole read of a struct that holds a reference, through a pointer reinterpreted from Go storage of another layout, is now refused by name where it used to be read as if the layouts matched.

type Q pair[int] and type P[T any] pair[T] now convert. A defined type whose underlying type is an instantiated generic struct used to make the converter drop the whole file that declared it, and the run still exited 0, so the package compiled without that file’s declarations or failed later for want of them. The type now converts to a wrapper over the instantiated struct: its fields and methods are reachable, a generic defined type declares its own type parameters, and a composite literal of it works inside and outside its package. The same holds when the generic is reached through a type alias, in the same package or another. The code GO2CS2004, which development builds briefly reported for this shape, is retired and stays reserved. A known limit: a second defined type stacked on such a type, when the struct is declared in another package, does not yet get every member and conversion generated, and fails at the C# build. See diagnostic codes.

A converted module names no directory of your machine. -recurse on a local module now records each of the module’s own source files the way go build -trimpath does, so a converted stack trace or runtime.Caller names the file as <module path>/<path in module>, where it used to carry the absolute path of the converting machine. This is the new -trimpath option, on by default; -trimpath=false keeps the absolute path, as an untrimmed go build does. Standard-library and module-cache sources are recorded the same way either way. A module converted again records its sources the new way. See -trimpath.

-provenance now says the file was changed. The option writes two lines into each converted file, the Go source file with its module and version, then // Modified from the original by conversion to C# with go2cs <release>., where it wrote one line naming the source file. The notice now follows the file’s upstream copyright and license comments, before the package doc comment, and still carries no timestamp. This is the notice Apache-2.0 asks of modified files: convert a module under that license with -provenance. See -provenance and Converting a module.

A conversion that loses a file now fails. When go2cs faults on one file (a bug in go2cs itself), it recovers, skips that file and converts the rest. The run used to print a warning and exit 0, so a conversion could lose a file, with its functions, methods, init and interface records, and still read as success. Each skipped file is now reported as GO2CS2008, every other file is still written, and the run ends with an error naming every skipped file. This covers a hand-owned file’s .cs.auto review sibling too. -warn does not accept GO2CS2008, since a missing file is not loud. If you see it, report it as a go2cs issue naming the file; -debug re-raises the fault with its stack. See diagnostic codes.

The Go implementation of TypeScript’s compiler now converts, compiles and type-checks. go2cs uses Microsoft’s TypeScript compiler in Go (microsoft/TypeScript’s tsc module, at a fixed commit) as a large real-world test, and each shape it found that did not convert or did not compile is fixed in this release. In go2cs’s readiness runs on Windows, every package that TypeScript’s parser, binder, type-checker and emitter need compiles with no hand edit to the converted C#, and the converted parser’s output matches native Go’s on every file of TypeScript’s parser test corpus. Measured on Linux x64 (JIT, Release build) at this release’s tree, the converted compiler’s output matches native Go’s on all 17,422 files of TypeScript’s parser test corpus, and type-checking and emitting each of TypeScript’s 7,404 single-file compiler tests, one at a time, matches native Go’s output on every one. Five of its language-server packages are still refused (GO2CS2005) and skipped, and xxh3 is used through the fork described below. The converted compiler is published, with its build and run instructions, in typescript-go-cs.

Among the shapes that now convert and run as in Go:

and a slice of pointers passed beside a callback to a generic function over an interface constraint (GetErrorBaseline[T Diagnostic](…, diagnostics []T, compare func(a, b T) int) called with a []*T), which did not compile;

and others. Two of these answered wrong without any error before: the promoted variadic method’s reflection count, and a loop header that re-pointed a pointer parameter, whose condition read a stale value. The standard library contains almost none of these shapes, so its converted code is unchanged by all but a handful of lines.

Code that ccgo translated from C converts further. modernc.org/sqlite and modernc.org/libc are C libraries translated to Go by ccgo, and converting them through go2cs found Go shapes that are rare in hand-written code but everywhere in translated C. At this release’s tree, modernc.org/sqlite v1.62.0 and every package it imports convert with no package refused, on Windows x64 and on Linux x64. A converted program that creates a database file, writes and reads it back in SQLite’s default journal mode and then in WAL mode, and removes it, prints exactly what the native Go program prints, on Windows x64 and on Linux x64. On Windows the conversion needs one extra value, -inline-arrays=modernc.org/libc#largeInteger, without which the first database opened in WAL mode panics (Known issues). The converted C# of both programs, for Windows x64 and Linux x64, is published with the recipe that reproduces it in sqlite-cs. These shapes now convert and run as in Go:

and others. Three uses of that last shape are not converted yet: the instantiation as a type argument the interface constrains, a required method promoted from an embedded field, and a second instantiation of the same type behind the same interface in one package. Each is named by the new warning GO2CS2007, and the C# build then fails at that site.

A write through the address of a field reached through a pointer conversion reaches the field. &(*T)(p).f is the address of field f in the memory p points at, and &*p is p itself, after Go’s nil check. Both used to box a copy, so every write through the result was lost with no error, and the result never compared equal to the field’s address or to p. sqlite’s mutexes record their owner through atomic.StoreInt32(&(*mutex)(unsafe.Pointer(m)).id, id), and libc’s fmod and remquo shift the bits of a double through &*, so both lost their writes. An increment or decrement through a conversion, *(*int32)(x)++, now compiles. In the standard library one line changes, in runtime’s heap growth (&(*arenaList)). See Pointers.

Parentheses around the operand of & change nothing. &((*T)(p).f) is the same address as &(*T)(p).f, and &(x) the same as &x, as in Go. With the parentheses, go2cs took the address of a copy, so every write through it was lost. libc’s recursive pthread mutex records its owner that way, and on Linux sqlite stopped forever the first time it opened a database, waiting on a lock it already held. In the standard library one line changes per target, in runtime’s heap. See Pointers.

sync.Mutex is Go’s eight bytes. C code translated to Go keeps mutexes in memory it allocates itself: sqlite’s mutex is a struct holding a sync.Mutex, allocated with libc’s calloc and reached through unsafe.Pointer. go2cs’s sync.Mutex held a managed reference, so reading one out of that memory was refused by name. It now holds only two 32-bit words, as Go’s does, and works the same in the managed heap, on the stack and in C memory. An idle mutex is eight zero bytes, so a copy of an idle mutex is a free mutex of its own, and contended locking no longer allocates. One difference remains: a mutex copied while a goroutine is waiting on it can wake that goroutine through the copy. Go’s vet reports every copy of a mutex after first use.

golang.org/x/sys/cpu reports the real CPU on amd64. x/sys/cpu reads the processor’s features with two assembly functions, cpuid and xgetbv, from its init. They converted to methods that throw, so a converted program that imported x/sys/cpu (modernc.org/libc does on windows and darwin) stopped before main. go2cs now forwards both to managed bodies in golib: cpuid asks the processor through .NET, and xgetbv, which .NET does not expose, is answered from what .NET reports about SSE, AVX and AVX-512. Measured on Windows x64, a converted module that imports x/sys/cpu reports every one of its 29 feature flags as Go does. The forward applies to x/sys/cpu as a module dependency; the standard library’s private copy is not used by converted code. x/sys/cpu’s arm64 feature reads are not covered: they keep their throwing stubs. If a future x/sys/cpu declares either function with another signature, go2cs refuses the package by name (GO2CS2011) rather than call a body that answers another question.

go2cs names every function it cannot give a body. A function in a third-party module that has no Go body (written in assembly, or pulled from another package with //go:linkname) and that go2cs does not forward still converts to a method that throws when called, and the conversion now names each one as warning GO2CS2012. A program that never calls it is unaffected. If yours does, report it as a go2cs issue naming the function. See diagnostic codes.

github.com/zeebo/xxh3 converts through a copy go2cs carries. xxh3 reads a string’s or a slice’s bytes through its header and at computed offsets, which go2cs cannot yet convert: the converted program stops with a named panic. The repository now holds xxh3 v1.1.0 with every use of unsafe removed, at src/forks/github.com/zeebo/xxh3@v1.1.0; it computes the same hashes bit for bit. A module that depends on xxh3 converts with replace github.com/zeebo/xxh3 => <go2cs clone>/src/forks/github.com/zeebo/xxh3@v1.1.0 in its go.mod. The general fix is planned. See Limitations.

Inside a pointer-receiver method, unsafe.Pointer of a local copy of the receiver now points at the value. In a method on *T, p := h followed by unsafe.Pointer(p) converted to the address of the local variable p itself, not of what p points to. A write through it landed on the local, the value never changed, and the program ran on with a wrong answer. A field holding a *T and a local copied from another local did the same. They now point where Go points; the receiver itself and a pointer parameter already did. Nothing in the standard library has this shape, so only your own code changes when you convert it again.

A nil func of a named func type is one value in an interface. Such a value read differently depending on how it reached the interface: asserting it back to its own interface type failed, an assertion to error reported “interface is nil”, a panic message named an internal C# class, and reflect’s Call, Method and MethodByName crashed with a .NET InvalidCastException. Each now answers as Go does, and reflect.Value.Call on a nil func panics with Go’s call of nil function.

A type switch finds a nil func in its case. case F:, with F a func type, missed a typed nil func, and the switch went on to a later case or to default without a word. It now matches F’s case. The standard library has seven such labels, in net/http and its tests.

A nil func passed to a named func type stays nil. Passing a nil func value where a parameter or a struct field has a named func type threw Delegate to an instance method cannot have null 'this' where Go passes nil. The value now arrives as nil.

A nil pointer is one nil inside generic code. A nil *T written as the literal nil and one that is a zero value (*new(T)) are the same nil in Go. Inside a generic function they were two: x != *new(T) was true for a nil x, a map with pointer keys could hold two nil keys, and an array of nil pointers compared unequal to another. They are one nil now. A typed nil pointer in an interface is still distinct from a nil interface, as in Go.

reflect reads a value behind an interface as the value. A named slice, map or other non-struct value held in an interface through one of go2cs’s adapters (a value converted to an interface it implements, or to error) was read by reflect as the adapter: Len and Cap gave 0 or panicked, Kind reported ptr, %v and ranging over the map printed nothing, and the program still exited 0. sort.Slice over such a slice panicked with call of Swapper on slice Value. reflect now sees the value itself, and two reflect.ValueOf calls over one interface value still compare equal.

A float converts to an integer type parameter. T(f) with f a float64 and T constrained to an integer type (T ~int32) did not compile after conversion. It now truncates toward zero, as Go does. An out-of-range value or NaN is left to the implementation by Go; go2cs gives the answer Go’s compiler gives on the machine the program runs on, measured for all 11 integer kinds on amd64 and on arm64 (Apple silicon).

A generic type whose Error method has a pointer receiver converts to error every time. Such a conversion could fail with “does not implement error.Error”, depending on which packages had loaded and in what order. It now finds the type’s own method whatever the order.

A deadlock report shows every goroutine, as Go’s does. After fatal error: all goroutines are asleep - deadlock! Go prints one block per goroutine: its wait reason, its frames, and the go statement that started it. A converted program printed the line alone, and when several goroutines saw the deadlock at once it could print it more than once. It now prints Go’s blocks, once, and exits with status 2. The report still appears only when every goroutine waits on a nil channel or an empty select {}; any other deadlock hangs (Limitations).

Every fatal report reaches debug.SetCrashOutput. Go copies whatever it prints while dying to the file set by runtime/debug.SetCrashOutput. A converted program did so for a Go panic, but not when a .NET exception escaped a goroutine, nor for the deadlock report: those went to stderr alone. They now reach the crash file too.

A profiled program no longer hangs. With the block or mutex profiler on, the first event on a stack the profiler had not seen could deadlock the thread that recorded it: building the profiler’s own record was itself sampled by the memory profiler, which waited on the lock its caller already held. At the default runtime.MemProfileRate that was a rare draw; at runtime.MemProfileRate = 1 it hung every time. The profiler’s own records are now made outside the memory profiler, as Go makes them.

runtime.GOARCH is arm64 on Apple silicon. It reported amd64 on every Mac, because the macOS packages are built once, for darwin/amd64. It now reads the architecture of the running process, and the GOARCH setting that debug.ReadBuildInfo returns and go/build’s default context follow it. On an Intel Mac and on win-x64 it still reads amd64. Everything decided by architecture when the packages are built still follows amd64 (Known issues). The tests of debug/buildinfo, net/http/pprof, go/build and go/internal/gcimporter now match Go’s on Apple silicon.

runtime.FuncForPC returns one *Func per function. It returned a different *Func for each call site of a function, and not the one runtime.Frames reports for the same frame. Now runtime.FuncForPC(pc) == frame.Func holds, two call sites of one function give the same *Func, and its Entry() is the function’s, as in Go. Measured on windows, linux and macOS.

os.Args under dotnet prog.dll on Windows. Started as dotnet prog.dll a b, a converted program read os.Args as [dotnet prog.dll a b], so every program that reads os.Args[1:] took the DLL as its first argument. It now reads [prog.dll a b], the shape the same launch gives on linux. Started through its own executable, the program was already right, and it is still the launch to use for a program that runs itself again with os.Args[0].

A zero-byte UDP datagram reads on macOS. Reading a zero-length datagram could fail with address family not supported by protocol family, where Go returns a zero source address. Measured on Apple silicon and fixed for macOS and linux.

Timers on macOS fire on time. On the hosted macOS runners a 5 ms timer fired 9 to 13 ms late at the median, where Go’s own timers on the same machines are late by 0.7 to 1.3 ms. go2cs’s timer service now waits as Go’s runtime does on macOS, and fires within the 1.5 ms its test allows, on Apple silicon and on Intel. This serves time.Sleep, timers, tickers and I/O deadlines.

CPU profiles on macOS name the program’s own code. The CPU profiler read each thread’s identity and CPU time through a .NET API that gives wrong answers on macOS, so nearly every sample was charged to _ExternalCode. It now reads them from the kernel, as the samples themselves are keyed. One .NET limit remains on macOS: in a loop that makes no calls, most samples are charged to the loop’s caller.

A nine-argument libc call on Apple silicon passes its ninth argument where Go 1.26 does. go2cs still placed it where Go 1.24 did. internal/syscall/unix’s getnameinfo is such a call.

unsafe.Sizeof answers Go’s size or refuses by name. For a type golib cannot size the Go way, unsafe.Sizeof fell back to .NET’s marshalling size, which is not Go’s: one dnsmessage type measured 48 bytes where Go says 32. It now panics, naming the type. Every type the standard library passes to it is sized the Go way, so converted standard-library code is unchanged, and a Native AOT program no longer carries a throwing marshalling stub for each type that reaches it.

In a converted test, t.Deadline() reports the deadline that ends the test. go2cs’s test runner can end a single test that runs past a per-test limit, which Go does not have, and t.Deadline() reported only the deadline of the whole package run. A test that sized a wait from it could wait past the limit that ended it, and the run reported it abandoned instead of its own result. t.Deadline() now reports the earlier of the two.

On Linux, runtime.SetDefaultGOMAXPROCS no longer throws. Three runtime routines that Go writes only in assembly, sched_getaffinity, osyield and exit, converted to methods that threw NotImplementedException on linux-x64 and linux-arm64, and SetDefaultGOMAXPROCS always reaches the first. They now have bodies: the raw sched_getaffinity system call, libc’s sched_yield, and the exit_group system call. A known limit remains: SetDefaultGOMAXPROCS returns without resetting the setting, so a converted program keeps the GOMAXPROCS it had, where Go goes back to its default. Measured on linux/amd64.

sync.Mutex takes a free lock at once. An uncontended Lock and Unlock pair took 321.7 ns and allocated 64 bytes; it now takes 66.4 ns and allocates nothing. With four goroutines contending, a pair went from 2,191 ns to 105 ns. Measured on linux-x64. One difference from Go is now easier to see: a goroutine that unlocks and at once locks again gets the lock back more often than a waiting goroutine does, because go2cs’s mutex has no starvation mode, Go’s bound on that.

Comparing pointers to struct fields is cheap. p == q, for two pointers to a field reached through several embedded structs, cost time that grew with the depth: at five levels an unequal compare took 717 ns, against Go’s 3.4. It now takes about 6 ns at one level and at five (linux-x64). The same change fixes a rare wrong answer: pointers into two different values could compare equal when their internal allocation numbers collided.

Less copying and boxing. A generated struct now implements IEquatable<T>, so a struct used as a map key is compared without boxing, and its hash code is computed without allocating. A named map or channel compared with nil no longer goes through reflection. unicode/utf8 and fmt no longer copy a string argument on one internal call each. Together these made the converted TypeScript compiler’s checker about 8% faster on its first 25 test units on linux.

Faster start-up for programs that convert pointer-held types to error. Finding a type’s pointer-receiver Error method read every extension method of every loaded package; it now reads only the type’s own. A program that loads many packages started about 40 to 65 ms faster under the JIT on linux/amd64; a small program sees no change.

A switch on a variable reads as written. switch os { … } used to copy os into a temporary named exprᴛ1 and test the temporary. When nothing can change the variable between the first case and the last, the converted switch now tests it in place; otherwise the temporary is named after it (osᴛ1). A select case on a channel variable names its temporary after the channel (quitᴛ1).

Converting for another platform reads that platform’s Go settings. With -platforms naming a target other than the converting host, go2cs now selects files gated on Go’s tool tags (goexperiment.*, amd64.v1, arm64.v8.0) for the target, as go build does, where it used the host’s. Go 1.26 turns the dwarf5 experiment off for darwin and on for windows and linux, so a darwin conversion on a windows host used to drop both halves of such a file pair. In the standard library this adds one file to the darwin build of internal/goexperiment.

A module’s package main keeps its own package_info.cs when converted again. A second conversion into the same output used to warn, falsely, that the file belonged to another package and replaced it with the template, dropping anything kept outside its marker sections.

A promoted interface method named like a type of its package converts. When a struct satisfies an interface only through its pointer, and a method promoted from an embedded interface field shares its name with a type of the package (method Driver beside type Driver), the converted method took the type’s renamed spelling, ΔDriver, and did not compile. modernc.org/sqlite’s tests reach this through database/sql/driver.Connector. The method now keeps its Go name, in its struct’s method holder.

On Windows, the go2cs tool’s first-use Go download no longer fails when another process briefly holds a file. The tool unpacks Go into a staging directory and renames it into place, and Windows denies that rename while a virus scanner or the search indexer still has a file in it open. The install now retries the rename for up to two seconds, as the go command does for the same errors, and when it still fails, names both directories. Measured on Windows: the new held-handle test failed before the change and passes after it.

On linux and macOS, a -tests run handles an interrupt as go test does. Ctrl+C now stops every process the run started, the converted test host included, and go2cs exits with status 130. Every child starts with SIGINT and SIGQUIT at their default handling, even when the run itself was started with them ignored (cmd &), so a converted test of signal handling sees what it would see under go test. See -tests.

A short-lived converted program starts faster with one project setting. Since 1.26.10.2 a converted program optimizes its hot code from its first moment. That keeps a long-running program fast, and costs a short-lived one part of its start. On win-x64 (a 6-core laptop), published programs started 30 to 50 ms sooner with .NET’s own delay, and 100 to 170 ms sooner when pinned to one CPU, about a quarter of a small program’s run. The same change made a loop of TLS handshakes 41% slower, and 1.9 times slower on one CPU. So for a short-lived tool, a CLI, or a container with one or two CPUs, set <GoCallCountingDelayMs>runtime</GoCallCountingDelayMs> in the converted project; for a service, a server or a benchmark, keep the default. The setting applies under the JIT and ReadyToRun, not Native AOT. The default does not change. See start-up or steady state.

Server garbage collection is a documented option for an allocation-heavy, long-running program. On linux-x64 (a 4-vCPU cloud VM), a large converted program, the TypeScript type checker, took about a third less time over a slice of its compiler tests with server GC on and DATAS off, and used about 15% more peak memory. The memory cost grows with the core count, so measure on the machine you deploy to. The settings take effect only in an executable. Converted projects keep .NET’s default, workstation GC. See .NET runtime settings.

A Native AOT publish is smaller and lighter to build, and the README walkthrough’s program now publishes. golib’s pointer box named a type that named the pointer box again, one level deeper each time, and Native AOT expanded that cycle until it reached its nesting limit, compiling every method past the limit as one that always throws. The cycle is gone. A program that uses only golib went from 654 such cut-offs to none and from a 19.7 MB executable to 11.2 MB. A larger benchmark program’s executable shrank by about a quarter, and the AOT compiler’s peak memory by a third or more (measured on win-x64). With the 1.26.10.3 packages the README walkthrough’s program, which uses github.com/fatih/color, did not publish with Native AOT on linux-x64: the compiler stopped at the native string table’s 2 GiB ceiling. Now it publishes, and its string table is 250 MiB. A program that go2cs -recurse converted now publishes with dotnet publish -r <rid> -p:PublishAot=true, run in the program’s own folder or naming the program’s project file: the converted libraries are compiled into the program and are not published on their own. Through 1.26.10.3 that command failed on the converted analyzer projects, and a folder converted with -recurse=nuget published each library on its own. See Tuning. A program under the JIT runs as before, with one benchmark 2.7% slower.

Tuning has a new section on Native AOT build time. One pass of the AOT compiler, which folds identical method bodies, takes most of its time on go2cs programs. Turning it off with IlcFoldIdenticalMethodBodies=false built one benchmark program 4.5 times faster and a large program in 7 minutes instead of 32, for an executable 11% to 15% larger. go2cs keeps the .NET default. See Native AOT method-body folding.

A new page, Go feature support, says feature by feature what converts. Each Go feature is marked supported, supported with limits, or not supported yet, grouped by area. Each row links to how the feature maps to C#, to a working example from the behavioral tests, or to the page that describes its limit. A pass over the user-facing pages fixed what an audit found wrong or out of date, across the README, Limitations, Known issues, the Roadmap and Consuming Go from C#, and Command line now lists every flag go2cs -h prints. To mark a repository or a package page as converted by go2cs, use the badge served from go2cs.net (how). The nugetgo pack now puts it first in the block it writes into a package’s README. The repository also has a code of conduct (the Contributor Covenant 2.1) and a pull-request template. Validated modules is refreshed: nine Go modules whose own test suites go2cs converts and runs, each read with Go 1.26.10 on the 1.26.10.3 packages, and the README links it beside the standard-library roster.

November 8, 2026 — Faster Native AOT, and a Release standard library from source

NuGet 1.26.10.3. The second fix release on the Go 1.26 line. The converted standard library is still built from Go 1.26.10. Converting a module uses a Go 1.26 toolchain, which the go2cs dotnet tool downloads on first use, and the .NET 10 SDK. One change below breaks both C# source that uses the packages and assemblies already compiled against 1.26.10.2; it is first under Upgrading from 1.26.10.2.

Upgrading from 1.26.10.2.

Revisions within a Go release stay compatible. From 1.26.10.3 on, every go.* and nugetgo package is checked against its previous revision before it ships. Within one Go release line (1.26.10.x), a newer revision keeps every public member the previous one had, so code built against it keeps running. The exception is a break that a release announces under Upgrading, as this one does for foreach.

Faster under Native AOT. Reading a slice element is now an inlined bounds-checked load under Native AOT, as it already was under the JIT. On win-x64, on one development machine, against the build before this change: a matrix-multiply benchmark ran in about 36% of the time, a prime sieve in about 51%, and a TLS handshake in about 75%. The JIT and ReadyToRun times did not move.

Two earlier changes in this release make the same programs faster under Native AOT. A slice element read no longer asks whether its element type takes no storage, so matrix-multiply, sieve and sort benchmarks take 13% to 18% less time. A 64-bit multiply with a 128-bit result now inlines, which together with the first change makes a TLS handshake take about 14% less time. Both are measured on win-x64, on one development machine, at the default x64 instruction set. Building a converted program for x86-64-v3 (<IlcInstructionSet>x86-64-v3</IlcInstructionSet>) gives no gain across the benchmark suite on the same machine, and an image built that way refuses to start on a processor without AVX2, BMI1, BMI2, F16C, FMA or LZCNT.

The first type assertion to an interface a type satisfies by its methods, without declaring it, is about twice as fast under Native AOT: about 117 ms in place of 254 ms in a small program on linux-x64, on one 4-core development machine. Native AOT now reads a list of extension-method hosts written at build time instead of scanning every type. The JIT is unchanged.

Single-file publishes start fast. A plain dotnet publish -p:PublishSingleFile=true of a converted program now compiles ReadyToRun one assembly at a time, as the publish profiles go2cs writes already do. The SDK’s default for a self-contained single file is one composite image, and compressed inside the single file it is decompressed at every start. On win-x64, on one development machine, a small converted program started in about 0.47 s against about 3.5 s, from a 33 MB executable against a 571 MB one. A project that wants the composite image sets <PublishReadyToRunComposite>true</PublishReadyToRunComposite>.

A conversion against standard library sources builds Release. A program converted with -recurse or -recurse=module against a local go2cs source tree (-go2cspath) no longer gets a solution file beside its project. So dotnet build -c Release in the program’s folder builds the standard library in Release, and dotnet publish -c Release -r <rid> there succeeds. With 1.26.10.2, that build compiled the standard library in Debug, about 21 times slower on a TLS handshake under the JIT (on win-x64, on one development machine), and the publish failed. A solution file an earlier converter wrote is removed only when it is exactly the one that converter wrote. A program converted against the published packages (-recurse=nuget) keeps its solution and was never affected. To build any converted program, name its project file: dotnet build MyProgram.csproj -c Release.

Faster P-521 and P-384. The P-521 field multiply is hand-written, constant-time code in place of the generated code, which made the first P-521 operation in a process, which builds a precomputed table, take 42.6 ms under ReadyToRun where it took 520 ms, on win-x64, on one 4-core laptop. P-384’s field multiply is rewritten the same way: a P-384 scalar multiplication takes about a quarter of its earlier time under ReadyToRun (about 38 ms to under 10 ms) and about a third under the JIT, on win-x64, on one laptop.

Faster P-256 handshakes. P-256’s field multiply is rewritten the same way. A TLS 1.3 handshake with a P-256 certificate and ECDHE takes about two thirds of its earlier time under ReadyToRun (about 62 ms to about 39 ms), on win-x64, on one laptop. The default handshake, with an RSA certificate, does not change.

AES-GCM on Apple silicon. On osx-arm64, crypto/tls prefers the AES-GCM cipher suites, as Go does there. The converted standard library is built for amd64 and runs as a native arm64 process on Apple silicon, so it now reads the processor’s AES and PMULL support from arm64.

On Apple silicon, runtime.GOARCH still reports amd64. The macOS packages are built once, for darwin/amd64, and serve both Macs, so a converted program on an Apple-silicon Mac reports amd64 where Go reports arm64 (Known issues). From this release each Mac’s results are compared with Go’s own build for that Mac, so the difference now shows in validation. The tests of go/internal/gcimporter, debug/buildinfo and net/http/pprof read the architecture: on the hosted osx-arm64 runners they differ from Go’s, and on the hosted osx-x64 runners they pass. A macOS count needs both, so those three packages are not validated on macOS in this release. Reporting the real architecture on Apple silicon is planned work.

internal/synctest is not validated on macOS in this release. One of its tests holds about 10,000 goroutines alive at once, and each converted goroutine is an operating-system thread, past the number of threads macOS lets one process run; on the hosted macOS runners, osx-arm64 and osx-x64 alike, that test fails. Limitations describes the limit and how to stay under it.

gojq for .NET. itchyny/gojq, a jq implementation in Go, is a NuGet package: nugetgo.github.com.itchyny.gojq 0.12.19 gives a .NET program an in-process, fully managed jq, with no native binary per platform. Its one dependency, itchyny/timefmt-go, ships with it as nugetgo.github.com.itchyny.timefmt-go 0.1.8. The package is gojq’s library. Its command-line package is not included: gojq’s own gojq command already does that job. Every package in gojq 0.12.19 converts with no change to its Go source. The library’s own tests are converted and run against Go’s: all 164 results match, with no exceptions, and that proof ships in the package as VALIDATION.md. The command-line package’s tests convert and pass in full too, 914 of 914, even though the package ships the library only. The converted sources are in ritchiecarroll/gojq-cs and ritchiecarroll/timefmt-go-cs.

Also in this release:


November 4, 2026 — Another package’s variables by address, and converted code that reads like Go

NuGet 1.26.10.2. The first fix release on the Go 1.26 line. The converted standard library is still built from Go 1.26.10, and converting a module still needs a Go 1.26 toolchain and the .NET 10 SDK. Two of the changes below break compiled C#. C# source that uses the packages compiles unchanged, apart from the one call listed under Upgrading from 1.26.10.1, but an assembly built against an earlier package must be rebuilt against this one.

Upgrading from 1.26.10.1.

Another package’s variables, by address. Taking the address of a variable another package exports now reaches the variable, as in Go: &otherpkg.V, flag.BoolVar(&otherpkg.Debug, ...), a pointer-receiver method value such as f := otherpkg.V.Reset, and an address inside it, &otherpkg.S.Field or &otherpkg.Arr[i]. Only a pointer- or interface-typed variable is still handed over as a copy (Limitations). This is a breaking change for compiled C# code: each exported variable of a value type is now a ref property over its storage, not a field, so an assembly compiled against 1.26.10.1 must be rebuilt against 1.26.10.2. C# source that reads or assigns pkg.V compiles unchanged. go.* packages now depend on each other at the exact release version, so when two of a project’s dependencies need different releases of one go.* package, the restore fails and names them (NU1107). A direct reference to that package overrides the exact versions with NU1608 warnings, and the mixed set can then fail at run time with MissingFieldException, so keep every go.* package at one release, or treat NU1608 as an error (<WarningsAsErrors>NU1608</WarningsAsErrors>). A read of such a variable costs about 0.5 ns more than a field read on the JIT, and about 0.7 to 0.9 ns more under Native AOT (measured on win-x64, one development machine).

String constants the compiler can inline. In the converted standard library a public string constant is now read through a same-named property the JIT and Native AOT inline; C# that uses one compiles unchanged, but an assembly built against an earlier package must be rebuilt.

Install go2cs as a .NET tool, with no Go installed. dotnet tool install -g go2cs installs the converter, a native executable for Windows, Linux and macOS on x64 and Arm64. The first conversion that needs Go downloads the Go release go2cs converts with, checks it against hashes built into go2cs, and keeps it in your user cache folder. go2cs toolchain installs that Go ahead of time, or from a file on a machine with no network access. The go2cs dotnet tool has the details. Building the converter from source still works, and now needs the .NET 10 SDK 10.0.400 or later (Building go2cs); converting a module needs no particular .NET 10 SDK, as before.

Converted code reads closer to the Go. Converted C# is meant to read like the Go it came from, and this release removes most of the remaining wrapping:

Faster from the first call. A converted program counts calls toward optimizing a method from the start, rather than after .NET’s usual quiet period of about 100 ms. On win-x64, a TLS handshake benchmark ran about a third faster under the JIT, and a trivial program took about 24 ms longer to start. A ReadyToRun publish precompiles golib and the standard library and leaves the program’s own code to the JIT, which can then inline across it: on the same machine, a published loop calling strconv.FormatBool ran in about an eighth of the time it took when everything was precompiled. <GoReadyToRunUserCode>true</GoReadyToRunUserCode> precompiles your own code too, and <GoCallCountingDelayMs>runtime</GoCallCountingDelayMs> restores .NET’s delay. Tuning has the measurements and every setting.

Single-file publishes keep ReadyToRun. The publish profiles go2cs writes beside a converted program now keep ReadyToRun on and compile it one assembly at a time. 1.26.10.1’s profiles turned it off, because a single-file publish compiled as one composite image runs out of memory; a profile publish now gets ReadyToRun’s faster start. A program converted by an earlier go2cs keeps its old profiles, since go2cs never overwrites one: Known issues says what to change.

A goroutine’s crash is not lost when main returns. When main returns while another goroutine is running a panic’s deferred calls, the program waits while that goroutine can still run, as Go does, so the crash report prints and the process exits with code 2. The wait used to be a fixed 20 ms, and on a busy machine a crashing program could exit 0 with nothing printed. A goroutine blocked in its deferred calls, on a channel or in a system call, does not hold the exit.

Large package-level data is built on first use. A package-level variable that holds a large pure-data value, such as one of unicode’s tables, is built the first time it is read, not when its package loads. 1.26.10.1 already did this; it was not announced then.

Also in this release:


October 26, 2026 — The converted standard library moves to Go 1.26.10

NuGet 1.26.10.1. The converted standard library is now built from Go 1.26.10, a release Go still supports, so it carries the Go security fixes issued through Go 1.26.10. Converting a module needs a Go 1.26 toolchain (any 1.26.x release) and the .NET 10 SDK as before; the standard library packages are converted from, and validated on, Go 1.26.10. 1.24.13.7 stays the last release built from Go 1.24.

Every package that can be validated passes Go’s own tests at Go 1.26.10, on Windows x64 and on Linux x64. Each package was re-converted from Go 1.26.10’s sources and re-validated from Go 1.26.10’s own test files, so every row’s counts on the roster are Go 1.26.10 readings. Validation on macOS continues package by package.

New and removed packages. Go 1.26 adds packages and removes or renames others, and the go.* packages follow it. 28 package IDs are new in this release:

go.crypto.hpke, go.crypto.internal.constanttime, go.crypto.internal.entropy.v1.0.0, go.crypto.internal.fips140.mldsa, go.crypto.internal.fips140cache, go.crypto.internal.fips140deps.time, go.crypto.internal.rand, go.crypto.mlkem.mlkemtest, go.go.internal.scannerhooks, go.internal.cgrouptest, go.internal.routebsd, go.internal.runtime.cgroup, go.internal.runtime.gc, go.internal.runtime.gc.internal.gen, go.internal.runtime.gc.scan, go.internal.runtime.pprof.label, go.internal.runtime.startlinetest, go.internal.runtime.syscall.linux, go.internal.runtime.syscall.windows, go.internal.strconv, go.internal.testhash, go.internal.trace.internal.testgen, go.internal.trace.internal.tracev1, go.internal.trace.tracev2, go.math.big.internal.asmgen, go.net.http.internal.httpcommon, go.testing.cryptotest, go.testing.synctest.

Ten package IDs have no Go 1.26 package behind them. Each is deprecated on nuget.org, pointing at 1.24.13.7, the last release that carries it, and at its Go 1.26 successor where there is one:

go.crypto.internal.hpke, go.internal.itoa, go.internal.runtime.syscall, go.internal.trace.event, go.internal.trace.event.go122, go.internal.trace.internal.oldtrace, go.internal.trace.internal.testgen.go122, go.log.slog.internal.slogtest, go.runtime.internal.startlinetest, go.vendor.golang.org.x.net.route.

A limitation to know about: the address of another package’s variable. When code takes the address of a variable that a different package exports and that is not itself a pointer, the pointer refers to a copy, so writes through it never reach the variable. That covers &otherpkg.V, a pointer-receiver method value such as f := otherpkg.V.Reset, and the common flag.BoolVar(&otherpkg.Debug, ...), where parsing the flag leaves otherpkg.Debug unchanged. A direct call (otherpkg.V.Reset()) and a read both work, and inside one package all of these work. To avoid it, keep the variable and the code that takes its address in one package, or have the package export a pointer or an accessor function. Limitations and Known issues carry the details.

crypto/tls and process start-up. Part of crypto/tls’s test suite runs BoringSSL’s interop cases, and it starts a new helper process for each one. A converted helper process takes about 10 s to start and run its handshake, where Go’s takes about 85 ms, measured on a Windows x64 desktop: .NET’s process start and package initialization, then compiling the handshake path in each new process. The whole interop run would take over an hour, so it is reported as a host limit, and every other crypto/tls test validates. The same machine read the same cost on 1.24.13.7: it is the per-process cost of a converted program, not a Go 1.26 change. A program that starts many short-lived converted processes pays that start-up each time. Reducing it (ReadyToRun-compiled test hosts, or tiered compilation in spawned child processes) is planned work.


October 14, 2026 — Converted code keeps Go’s comments and spacing, and HTTPS works on macOS

NuGet 1.24.13.7. This is the last release built from Go 1.24. The next one moves the converted standard library to Go 1.26.

Comments and blank lines land where Go put them. Converted C# is meant to read like the Go it came from, and until now its comments and spacing did not always follow. A type’s doc comment could be missing, a comment inside a function could land after the code it described, and the blank lines that group statements in a Go function were dropped or doubled. This release fixes those. One real example, from the converted internal/fmtsort. The Go:

// SortedMap is a slice of KeyValue pairs that simplifies sorting
// and iterating over map entries.
//
// Each KeyValue pair contains a map key and its corresponding value.
type SortedMap []KeyValue

Before, the declaration stood alone, with no comment:

partial struct SortedMap /*[]KeyValue*/;

Now:

// SortedMap is a slice of KeyValue pairs that simplifies sorting
// and iterating over map entries.
//
// Each KeyValue pair contains a map key and its corresponding value.
partial struct SortedMap /*[]KeyValue*/;

What changed, by kind:

Comments are carried when you convert with -comments, as the converted standard library is. The blank lines apply to every conversion. Nothing that runs is different: the change is in comments and whitespace, and every validated package holds its count.

A multi-line raw string keeps its exact bytes. A Go raw string literal that spans lines now converts to a C# raw string literal, closed by a call that restores Go’s rule for such literals. The string has the same bytes as in Go however the file’s line endings were checked out.

HTTPS on macOS. Verifying a certificate against the system’s roots reached an unimplemented stub on macOS, so an ordinary https request from a converted program failed there, on Intel and on Apple silicon. It now calls the system’s own verification, as Go does.

Native AOT, fully trimmed. Two defects that showed only in a Native AOT publish with TrimMode set to full are fixed. The default publish and programs running under the JIT never had them.

The price is size again, and the choice is the same as before: behaving like Go comes first. Measured on win-x64, a fully trimmed C# program that references the packages is about 26% larger than it was in 1.24.13.6.

Two pointers to one field are equal, however the field was reached. A field promoted from an embedded struct can be named two ways, &s.X and &s.Inner.X. The two pointers now compare equal, as they do in Go. Before, they could compare unequal. This one applied to every program, under the JIT as well.

Starting a goroutine is cheaper. The runtime library recorded where each goroutine was started by walking the whole call stack. It now resolves that once for each go statement. Code that starts goroutines from deep recursion was the worst case, and is the one that improves most.

Converted modules. Packages published through nugetgo.net can now carry separate assets for each platform, as the go.* packages do, for a module whose Go source differs by operating system.

Also in this release. The Tour of go2cs pins the converter and package versions it runs with. The README says plainly what to expect from the project: it is one person’s work, replies are best-effort, and it says where to ask.

The go.* packages are built and versioned together, so use one version of them in a project.

October 12, 2026 — Reflection works under Native AOT, and macOS validation passes three quarters

NuGet 1.24.13.6. This release is about converted Go behaving the same in more places: under Native AOT, on macOS, and at the edges where a call used to reach an unimplemented stub.

Reflection under Native AOT. Go’s reflect creates values of types it learns about at run time. Until now the runtime library did that by generating code at run time, which Native AOT cannot do, so a program that reflected over its own types could fail once published that way. The source generators now write those operations at build time, for every type a package defines and every container type that can reach reflect. reflect.New, reflect.Zero, the Make functions and conversions between struct types behave under Native AOT as they do under the JIT, in a default publish and in a fully trimmed one.

This costs size, and the choice is deliberate: behaving like Go comes before being small. Measured on win-x64, a C# program that references the packages publishes about 10% larger with the default trim and about 4% larger fully trimmed, and programs that lean on reflection over generic types grow about 12% fully trimmed. A Native AOT publish is still slow and large to begin with (Known issues). Three cases still take the old path under Native AOT only: a conversion to an interface inside generic code, a container reachable only through a field another package does not export, and a struct whose own package never takes a pointer to it.

One defect is known in a fully trimmed publish: fmt prints some named types in their raw form (fixed in 1.24.13.7). The default publish is not affected, and the fix is in the next release.

Converted modules as NuGet packages. Three Go modules are published at nugetgo.net: hashset, google/uuid and golang-jwt/jwt v5. The tooling that packs them now refuses a package whose standard-library references are not a published release, records no path from the machine that built it, and binds the package’s validation record to the exact files packed. A package’s README on nuget.org is the author’s own: the pack keeps one fenced block in it up to date, with the badges and the provenance, and leaves the rest alone. For a conversion, -nuget-map-feed reads mapped packages from a feed you name, such as a local folder, instead of nuget.org (Command-line options).

Every go.* package says how it was checked, and how to call it. The Tests badge on each package’s README now reads the two numbers that matter, tests matched and tests disclosed, and links the package’s proof page. Below it, one line names the C# class that holds the package’s functions, so a C# developer who lands on go.strings knows to call go.strings_package.

Two calls that reached a stub now answer as Go does. A measurement of which exported functions can reach an unimplemented stub found two on Windows and Linux. runtime/coverage.ClearCounters now returns Go’s own error for a program built without coverage, and runtime.Breakpoint breaks into an attached debugger, or without one stops the program with Go’s report line.

macOS. Validation of the standard library on macOS passes three quarters of the roster: 171 of 225 packages now carry a macOS count, each agreed between Apple silicon and Intel (the roster). Four fixes came out of that work. os.Executable returns the program’s path. The memory page size is the machine’s real one, 16 KB on Apple silicon, where it was fixed at 4 KB. hash/crc32 uses the processor’s CRC instructions on Arm64. And on Linux and macOS os.Args[0] is the name the program was started with, as it is in Go, so a program that starts itself again under another name recognizes itself. Verifying a certificate against the system’s roots still reaches a stub on macOS; that fix is promoted ahead of the rest of the macOS work.

The go.* packages are built and versioned together, so use one version of them in a project.

October 9, 2026 — Converted code reads like Go, and Native AOT runs on Windows

go2cs converts Go into C# that a Go developer can read, and this release removes most of what stood in the way. Until now, converted code carried attributes that told the build what Go’s own syntax already says: [GoRecv] on every method with a pointer receiver, [GoType] on every type, and others on embedded fields, struct tags and array parameters. In the converted standard library they stood on more than five thousand method declarations alone. They are gone from converted code.

Nothing they said is lost. Each fact now sits where a Go reader already looks:

The go2cs source generators read the signature or the comment at build time and write the attribute form into generated code, where the runtime and reflect find it. So the converted file is left with the code, and what it compiles to is unchanged. Converted code, before and after the face lift shows nine real examples from the converted standard library on both sides of the change, each beside the Go line it came from, and the reference lists every marker and the few attributes that stay, with the reason for each.

The whole standard library was converted again for this release, and every validated package holds its count: the roster’s packages pass Go’s own tests at the same verdict counts on Windows and on Linux as before the change. Hand-written C# is untouched by it. A file written by hand keeps its attributes, and the generators and the runtime read either spelling. The go.* packages are built and versioned together, so use one version of them in a project.

A C# project that references the go.* packages now runs under Native AOT on Windows. With the 1.24.13.4 packages such a program, published with PublishAot, stopped on Windows at its first call to runtime.Caller, which Go’s log and testing packages reach. It now runs. The Native AOT check that gates the release publishes a C# consumer of the packages and runs it on linux-x64, win-x64 and osx-x64, and it passes on all three. osx-arm64 is not measured. A project that sets no trim mode of its own gets the packages’ default, a partial trim, so the startup failure the 1.24.13.4 packages showed without that setting is gone too. The publish is still slow: over an hour on a hosted CI machine for Linux and for Windows, and several hours for an Intel Mac.

A fully trimmed Native AOT build runs for the first time. With TrimMode set to full, a consumer of the packages used to stop at startup, because a full trim removed members the runtime library reaches by reflection. Each package now registers the Go types it defines, and the consumer runs. The cost is size: a fully trimmed executable keeps every Go type the program can reach, so it is about twice as large as before (12.4 MB to 24.5 MB for the measured consumer), where it used to keep less and fail. The default partial trim is unchanged, in size and in behavior. The runtime library’s own trim warnings fall from 76 to 32 in the same change. This is measured on win-x64, on one development machine; the hosted check measures the default trim.

Fixes since 1.24.13.4 that a user of the packages or the converter sees:

October 1, 2026 — Every implementable standard-library package validates

Every implementable package in Go 1.24.13’s standard library now validates its own test suite in C#. That is 225 of 225, and 225 of the 230 testable packages, 97.8%, at 69,777 matching verdicts against go test -json, with 373 divergences disclosed by exact failure signature. On Linux, all 223 applicable rows validate at their own Linux counts, at 69,617 matching verdicts with 392 disclosed. The other two, internal/syscall/windows and internal/syscall/windows/registry, are Windows-exclusive and have nothing to compile there.

The last two packages validated today. runtime validates at 10,819 matching verdicts, with 71 disclosed (10,810 and 73 on Linux). This is the Go runtime’s own suite, run against the managed runtime that replaces Go’s. It covers the scheduler and preemption, channels and select, finalizers and cleanups, and defer, panic and recover in every ordering, with Go-spelled tracebacks and crash reports read back from child processes. It also covers maps, stack growth and Windows callbacks. One test, TestMapIterDeleteReplace, contributes 10,001 of those verdicts through its subtests, and the roster row says so. Of the 71 disclosures, 33 name something the managed runtime cannot truthfully describe: Go’s SEH unwinder, its inline tree, GC bitmaps, the tiny allocator’s layout. Another 24 are deferred. They are allocation counts, plus one live-heap metric that the managed host has no Go mark phase to produce, and each carries a measured reading and the plan that retires it. When the Go 1.23.12 record closed on September 7, this suite could be read only as far as index 104, where a crash killed the test host. Now every verdict is read and accounted for.

runtime/pprof validates at 145 matching verdicts, with 7 disclosed (147 and 7 on Linux). It covers CPU, heap, goroutine, block and mutex profiles taken in the managed runtime, labels raced across goroutines, and the profile builder’s proto encoding. Six of its tests wait for another goroutine’s interior frames in runtime.Stack. Because the CLR cannot walk a foreign thread’s stack, those six are withdrawn from both sides by name.

The September 24 announcement stood at 218 of 230. Since then, every one of the six implementable packages it named as not yet validated has validated. net/http validated again on September 25, at all 1,387 verdicts, once Go 1.24’s internal/synctest was supported. internal/synctest itself validated at 28 of 28 on September 27, the same day as reflect, now at 396 matching with 22 disclosed. net/http/pprof validated at 15 of 15 on September 28, and runtime and runtime/pprof complete the six today. A seventh package joined because the implementable set itself grew. On September 28, runtime/trace stopped being an exclusion: go2cs’s managed execution tracer writes a trace that Go’s own parser accepts, both of its verdicts matched, and the implementable set grew from 224 to 225. The same day runtime/debug left the roster, when its disclosure for TestStack was found to match by substring and absorb assertion lines it should not have. It returned on September 30, at 8 matching with 1 disclosed, and TestStack is now a plain pass.

The figure needs to be read exactly. A row is all-or-nothing. A package joins only when every eligible Test verdict matches Go’s or is disclosed, so a package matching every verdict but one scores zero. A disclosure names a specific Go assertion that the converted suite provably cannot satisfy, and it is pinned by exact failure signature in a committed manifest, so any other failure is a hard mismatch. Disclosures are never a tolerance, and nothing is skipped quietly; the few tests withdrawn are withdrawn from both sides, by name. Validation counts Test functions. Runnable examples, fuzz seed corpora and benchmarks are the next validation slice. Within that scope, this is the goal Phase 4 was given. The 100% counts finished packages, judged by Go’s own tests, and the 373 disclosures are where the record says what a managed runtime cannot do, or does not do yet. Every one of the 225 rows links a proof page that lists Go’s verdict beside go2cs’s, test by test.

Five testable packages sit outside the implementable set. Every one of them is an internal package that no Go program outside the standard library can import, and each is listed with its class, mechanism and evidence. runtime/internal/wasitest is a WASI test package that runs no test on windows/amd64, because its only selecting test skips unless the target is wasip1/wasm. internal/unsafeheader builds live slices and strings by writing raw header fields, a memory model a managed runtime deliberately does not have, so a pass would be fabrication rather than implementation. The other three run cleanly but validate nothing about the port. net/internal/cgotest’s only test has an empty body, internal/copyright scans the GOROOT both sides share for copyright notices, and crypto/internal/fips140deps shells out to go list to check the Go tree’s import policy. An excluded package rejoins the count the day its evidence changes, as runtime/trace’s did.

Go’s own tests first passed in C# on July 17, with unicode/utf8’s fourteen verdicts. Seventy-six days later, the last implementable package validated.

The converted standard library ships as NuGet 1.24.13.3, targeting .NET 10. It is the first release published with every implementable package validated. Every proof page is frozen at validation/1.24.13.3 for the badges the packed READMEs link, and the exact shipped tree is browsable at the nuget-1.24.13.3 tag.

With the standard library validated, the work turns to real Go code brought to .NET. Whole modules will be converted together and validated against their own test suites, so that a module is judged by its own tests the way the standard library is. Alongside that comes nugetgo.net, a registry for converted Go modules.

Roster commit 133ca704e · tag nuget-1.24.13.3

September 24, 2026 — The converted standard library moves to Go 1.24.13, and 218 packages validate against it

go2cs now converts Go 1.24.13’s standard library, and the validated roster crossed the hop re-derived, not carried: 218 of the 230 testable standard-library packages validate their own Go 1.24.13 test suites in C# — 56,974 matching verdicts against go test -json, with 283 divergences disclosed by exact failure signature — and, measured against the 224 packages a faithful managed conversion can honestly validate at all, 97.3%. On Linux, 187 of the 216 applicable rows validate at their own Linux counts, at 53,048 matching verdicts. Every validated row is proved by a run at Go 1.24.13.

The count rises by fourteen from the Go 1.23.12 record’s 204 while the testable set grows by fifteen, so both percentages dip — 97.6% to 97.3% of the implementable set, 94.9% to 94.8% of the testable one. One package validated at Go 1.23.12 is not validated at Go 1.24.13: net/http. It matches 1,370 of its 1,387 verdicts, and all 17 divergences trace to tests run under Go 1.24’s new internal/synctest, the runtime support behind the experimental testing/synctest, which go2cs does not yet support; it still ships as go.net.http. Go 1.24 moved ten validated packages to new import paths, and their tests validate under the packages that now hold them. Counting those, twenty-five rows join, among them unique and Go 1.24’s new crypto/hkdf, crypto/mlkem, crypto/pbkdf2, crypto/sha3 and weak. Six implementable packages are not yet validated: reflect, runtime, runtime/pprof, net/http/pprof, net/http and Go 1.24’s new internal/synctest.

On Linux the count falls from 198 to 187: the relocated packages’ tests are not yet run on Linux at their new paths, and go/internal/srcimporter has no Linux result, because Go’s own test of it fails on the Linux reference machine; it stays validated on Windows. The verdict total doubles because Go’s suites grew — crypto/cipher alone matches 27,272 verdicts, against 13 at Go 1.23.12 — so verdict totals do not compare across Go releases.

Converted programs get Go 1.24’s APIs — os.Root, weak.Pointer, crypto/mlkem and strings.Lines, among others — and //go:embed support. go2cs itself now builds with Go 1.24.13, and a -recurse=nuget conversion needs its module to resolve to Go 1.24; to stay on Go 1.23, build the converter at the nuget-1.23.12.3 tag with Go 1.23.12 and use the 1.23.12.3 packages. Go 1.24’s FIPS 140-3 module converts and its tests validate, but go2cs makes no FIPS 140-3 claim: the module’s integrity self-check hashes a binary layout that a .NET assembly does not have, so under GODEBUG=fips140=on the converted check reports success without verifying anything.

Fifty-one package IDs are new, six of them for packages a Go program can import: go.crypto.fips140, go.crypto.hkdf, go.crypto.mlkem, go.crypto.pbkdf2, go.crypto.sha3 and go.weak. Fourteen end at 1.23.12.3, their last release, because Go 1.24 moved or deleted their packages; none is importable outside the standard library, and each stays restorable at 1.23.12.3 and is never unlisted.

The converted standard library publishes as NuGet 1.24.13.1 — 344 packages, author-signed, still targeting .NET 10 — with every proof page frozen at validation/1.24.13.1 for the badges the packed READMEs link, and the exact shipped tree browsable at the nuget-1.24.13.1 tag. The Go 1.23.12 record stays frozen as it shipped, at validation/1.23.12.3.

Full story: The converted standard library moves to Go 1.24.13 · tag nuget-1.24.13.1

September 7, 2026 — The Go 1.23.12 record closes at its anchor; the corpus hops to Go 1.24

The Go 1.23.12 validation record is closed. It stands at 204 of the 215 testable standard-library packages — 28,459 matching verdicts against go test -json, with 167 divergences disclosed by exact failure signature — and, measured against the 209 packages a faithful managed conversion can honestly validate at all, 97.6%. On Linux, 198 of the 202 applicable rows validate at their own Linux counts, at 23,199 matching verdicts. Those figures are an anchor rather than a running total: the corpus now moves to Go 1.24.13 instead of driving this release to 100% first.

Five packages remain unbanked here — reflect, runtime, unique, runtime/pprof and net/http/pprof — and none of them is written off. A version hop re-derives every roster row from the new release’s own test sources — numerator, denominator and disclosure set alike — so all five re-validate against Go 1.24 on exactly the footing of the 204 that banked. What holds each back differs: reflect is measured and under active converter and runtime work; runtime is measured only as far as a host-killing crash — TestCrashWhileTracing, at index 104 of its 883 verdicts — which leaves everything after it unread; unique is measured at 19 of its 20 verdicts under the configuration of record and waits on planned runtime-model work; and runtime/pprof and net/http/pprof are each measured on two hosts and held by a capability or classification decision.

The reordering is deliberate, and it is worth saying why, because the percentage means something narrower than it looks. The metric is package-based, not content-based: a row is all-or-nothing, so a package matching most of its verdicts still scores zero, exactly as one matching none of them does — which is what keeps the roster honest, and what makes the headline a count of finished packages rather than of passing tests. What is left is therefore a long tail of runtime-model work — Go’s own heap layout, its type descriptors, its profiling internals — that does not stand between a user and a converted program. The project is measured against a trustable platform that migrates packages and applications from Go to C#, and a more recent Go standard library unlocks more of that than the tail does. This is not a compromise but a reordering: the hop that unlocks user capabilities happens first, and the remaining guardrails are handled after it.

The 1.23.12 corpus ships one final NuGet release as that anchor before the pin moves — the release that freezes its roster, its proof pages and every package README at the record above. It has to come first: the pin bump resets the build counter, so once the corpus names Go 1.24 there is no longer any version left in which the 1.23.12 record could ship.

August 29, 2026 — Over 90% of the standard library’s test suites pass in C#

189 of the 215 testable standard-library packages validate their own Go 1.23.12 test suites in C# — 26,043 matching verdicts against a clean go test -json baseline, with 148 divergences disclosed by exact failure signature and nothing else waived. Seven of the 215 cannot be validated at all — no eligible tests on this platform, a broken upstream oracle, or a suite whose whole subject is the raw memory layout a managed runtime deliberately does not have — so against the implementable set of 208 the roster reads 90.9%. On Linux, 178 of the 188 applicable rows validate at their own Linux counts, at 21,807 matching verdicts.

The push past 90% landed net itself — 472 verdicts, the roster’s largest networking row — banked the day two phantom DNS servers and a router forwarder stopped impersonating an oracle. A host whose own go test net fails is disqualified as a reference, because the two sides of a differential would then be running different oracles; qualifying one was the work. reflect compiled and executed for the first time alongside it, and net/netip, net/http/cookiejar and debug/pe joined the roster in a single day.

The converted standard library publishes as NuGet 1.23.12.2 — 307 packages, author-signed — with this release’s 189 proof pages frozen at validation/1.23.12.2 for the badges the packed READMEs link, and the exact shipped tree browsable at the nuget-1.23.12.2 tag.

Added to the archive on September 7, 2026; the announcement itself ran on the project’s front page from August 29. Release freeze and announcement: 773afa2c2 · published: d2da277f5

August 25, 2026 — Both runtime pins move: .NET 10, Go 1.23.12 — and the whole roster re-proves itself

go2cs now targets .NET 10 and converts Go 1.23.12, and the validated roster crossed the hop the only honest way: re-derived, not carried. Every one of the 162 banked packages re-validated from the new release’s own _test.go sources — 18,598 matching verdicts against a clean go test -json baseline at the new pins, with the 85 disclosures re-signed against the new sources — count and per-row set unchanged. The 29 new verdicts over the 1.23.1 record come exactly from the four suites whose verdict counts moved with the release (time, os/exec, syscall, database/sql), reconciled to the digit across the machines that ran the re-validation shards. A version hop invalidates every row’s numerator, denominator and disclosure set by design; there is no carry-forward path, so agreement at the new pins is measured, never assumed.

The .NET half moved 955 project files to net10.0 with zero corpus-emission drift across all three OS flavors — and immediately earned its keep: C# 14’s new implicit array-to-span conversion changed which overload form a variadic call binds, exposing that the corpus’s variadic-slice binding had been correct by accident under C# 13. The converter now emits the binding that is correct on purpose.

The converted standard library publishes as NuGet 1.23.12.1 — each package README freezing its validation badges against this release’s own proof snapshot, with the exact shipped tree browsable at the nuget-1.23.12.1 tag.

August 22, 2026 — Over 75% of the standard library’s test suites pass in C#

162 of the 215 testable standard-library packages (75.3%) validate their own Go 1.23.1 test suites in C# — 18,569 matching verdicts against a clean go test -json baseline, with 85 signature-pinned disclosed divergences. Each suite is converted from Go’s own _test.go sources, built against the converted standard library, run under the Go-semantics test host, and compared verdict for verdict; a package joins the roster only when every eligible test agrees.

The milestone is tagged because something genuinely hard landed with it. A converted stack frame now reports a Go file and line. The position is derived from conversion-time facts rather than composed — file and line ship together, because either alone names a position that exists in neither tree — and the identity is build-shape-faithful: the published standard library reports the same trimpath form Go bakes into a published binary, while a converted user module reports the source path Go would have baked for that build. runtime/debug, log, log/slog and flag all rest on it.

Three more capabilities landed alongside. Channel direction and map key/element dimensions ride the type descriptor, so reflect distinguishes <-chan int from chan int and a decode target can measure an array it has never populated — which retired an entire disclosure class on its own recorded remedy and banked both template packages. A native pointer slot holds the pointer’s value, not a managed reference, closing a round-trip that had also hidden a GC-invisible dangling-reference hazard. And an always-on GC recorder supplies real pause and release facts to runtime/debug’s statistics surface at zero cost per read.

What the work declined is part of the record. A disclosure names something the managed runtime provably cannot satisfy — never something merely unimplemented — so packages that reach 105 of 106 or 210 of 267 stay off the roster with their remaining root named and priced. Four disclosure classes carry the roster’s divergences today; a fifth retired itself the day its remedy landed, exactly as it was written to.

This is Go 1.23.1’s terminal validation marker. Every roster row re-derives from a release’s own test sources at a version hop, so validation continues on Go 1.23.12 — the release users would actually choose — with the 1.23 story living on its own branch.

August 8, 2026 — Go programs run on Linux

Converted Go programs now run on Linux, byte-identical to go run: fmt.Println("hello, 世界"), a program crossing os.Args, os.Getenv and time.Now(), and the README’s own real-world walkthrough — fatih/color printing true ANSI colour under a real PTY, with the isatty branch agreeing with Go in both directions (plain when piped, coloured on a terminal). The whole effort landed in one continuous arc: the repository checks out deterministically on any filesystem, the converter and every harness instrument run natively on Linux, the standard library compiles for windows, linux and darwin from one tree (per-GOOS source folders selected by $(GoTargetOS), windows the default, with 141 of 141 shared-source packages measured IL-identical across flavors), and each Go package ships as one NuGet package carrying RID-specific assemblies only where source genuinely varies.

At the bottom of it all sits one measured keystone: Linux’s entire syscall surface crosses the kernel through a single libc syscall(2) binding whose three claims were probed rather than argued — the variadic ABI with a real six-argument mmap, the second return register shown to be exact (the kernel preserves RDX), and errno round-tripped through a deliberate fault. The road there surfaced exactly two converter defect families and a handful of linkname wiring gaps — including the lesson that a forward alone can pass a run and be wrong (os.Args silently empty), which is why every wiring row now pairs with its populated truth. The FFI surface simultaneously converged on source-generated [LibraryImport] bindings, where non-blittable signatures fail at compile time — three latent marshalling hazards surfaced during the migration, each converted explicitly.

Stated plainly: the published 1.23.1.4 packages still carry Windows-only assemblies — the Linux experience ships with the next release; a Linux consumer of the few platform-divergent packages also needs the compile-surface answer scheduled next; and darwin binaries are compile-proven and IL-identity-backed but have never been executed here. Windows did not move a byte through any of it: every merge kept the converter’s behavioral-test output byte-identical, the behavioral suite green, and the 110-package validated sweep at 13,628 verdicts with zero failures.

August 8, 2026 — Over half the standard library validates; defers reach zero allocation

Three days took the validated roster from 73 packages to 110 of 215 (51.2%) — 13,628 matching verdicts against go test, 50 disclosed divergences, not one added in the climb. The largest single advance was also the quietest: a re-scout of never-measured packages found 34 that validated with no changes at all — the corpus had grown past them as shared machinery landed. The loudest was architectural: defer now compiles to an inline try/catch/finally over a ref struct frame — no closure object, no delegate per defer, zero allocation for non-capturing defers — replacing the execution-context lambda while improving behavioral fidelity (a capture-semantics divergence class died by construction). Three runtime capabilities were hand-implemented on managed primitives following the established pattern: Go’s concurrent hash-trie map, weak pointers, and caller-frame walks. And three user-reported -recurse failures — a quoted go.mod directive, a C# keyword inside an import path, and a type renderer chasing its own tail through <-chan — were each root-caused, fixed, and answered on the issue the same day, ending with gopkg.in/yaml.v3 converting, compiling, and running byte-identical to go run.

July 26, 2026 — More than a quarter of the standard library’s test suites pass in C#

57 of the 215 testable standard-library packages validated their own Go test suites in C# — 26.5% of the Phase-4 target, at 1,459 matching test results with 47 honestly disclosed as divergent rather than quietly dropped. A package counted only when every Test function’s verdict matched a clean go test -json -count=1 baseline. The set moved well past leaf packages: sync’s own concurrency suite, the RE2 engine in regexp, strconv’s float formatting, the crypto/sha* family, and the reflection-driven errors, encoding/binary and go/token — the last round-tripping a FileSet through the real converted encoding/gob. The same push made goroutine exit, string-literal allocation and structural interface assertion behave the way Go specifies, and corrected two published performance figures that had been measuring the wrong artifact. Per-package counts are in Validated Test Packages; the measured numbers in Performance.

Full story: More than a quarter of the standard library’s test suites pass in C# · commit 44fcc4f04 · reproduce any row from a clone via Try it yourself


July 18, 2026 — unicode/utf16 validates; disclosed-divergence generalizes

Phase-4 package #5. unicode/utf16 validated its own Go test suite in C# — 8 tests agreeing outright against go test -json, plus one honestly disclosed. The structural twin of the very first validated package (unicode/utf8), it round-trips UTF-16 encode/decode with results checked by reflect.DeepEqual, exercised through the converted reflection bridge. Its significance was the ninth test: TestAllocationsDecode asserts a zero-allocation Decode, which Go reaches only through compiler escape analysis and a managed runtime provably cannot match. unicode/utf16 was the first package to reuse the disclosed-divergence manifest as a general tool rather than a two-package special case, pinning that one alloc-profile row by exact failure signature while a separate test proved the decoded output correct — a mechanism that generalizes cleanly is a mechanism that was designed right.

Full story: unicode/utf16 validates; disclosed-divergence generalizes · Phase-4 package #5 · 8 + 1 disclosed (alloc-profile) · reproduce from a clone via Try it yourself


July 18, 2026 — bytes and strings tests pass, with disclosed-divergence

Two more standard-library packages validated their own Go test suites in C# — and they arrived with a new piece of Phase-4 machinery. bytes validated 81 tests and strings 68 against go test -json, bringing the Phase-4-validated count to four after unicode/utf8 and sort. Both contain tests that assert an exact allocation count via testing.AllocsPerRun — unsatisfiable by design in a managed runtime, where the divergence is the allocation model, not the measurement. Rather than silently skip them, go2cs began disclosing them at test level: a hand-owned, repo-committed go2cs_test_disclosures.json pins {test, divergence class, expected failure signature}, and the differential oracle reclassifies a result only when both the test name and the pinned signature match — an integrity guard, not a blanket exemption. Packages without a manifest compare strictly.

Full story: bytes and strings tests pass, with disclosed-divergence · Phase-4 packages #3 and #4 · sort 63/63, bytes 81, strings 68 · reproduce from a clone via Try it yourself


July 17, 2026 — Go’s own tests now pass in C#

A standard-library package’s own Go test suite — converted to C# — ran and agreed with go test, verdict for verdict. unicode/utf8’s real test suite (Go 1.23.1) validated 14/14 through the new converted-test pipeline: the _test.go files are transpiled to C#, built against the converted standard library, executed under a Go-semantics test host, and differentially compared against a clean go test -json baseline by full test name — with every benchmark and example declaration honestly disclosed rather than silently skipped. One week after “the whole standard library compiles,” the answer to “but does it run?” had its first machine-checked proof, reproducible from a clone. This opened the Phase 4 operational era — real Go tests, not compilation, are the currency of correctness — with sort, strings and bytes next in line.

Tag: utf8-tests-green-2026-07-17 · commit 337a928df


July 14, 2026 — The converted Go standard library is on NuGet

The converted Go standard library, the golib runtime, and the go2cs-gen analyzer are published to nuget.org as go.<pkg> / go.lib / go.gen, versioned 1.23.1.<build> from src/version.props. The converter’s new -recurse=nuget mode emits matching <PackageReference> entries — defaulting $(GoStdLibVersion) to a floating release — so a converted end-user app or library restores the whole go2cs stack from NuGet with no local go2cs source checkout; the app’s own and third-party converted packages stay project references. See Converting a real-world module for the end-to-end walkthrough.

Tag: nuget-stdlib-2026-07-14 · commits 2363af0e6, 2e15eec9d, dd821a556


July 10, 2026 — The entire Go standard library compiles in .NET

All 302 packages of the auto-converted Go standard library (Go 1.23.1) compile cleanly as .NET assemblies — zero errors, zero exclusions. Every package you’d expect to be hard is in that number: runtime, reflect, net/http, go/types, crypto/tls, database/sql, encoding/json. The transpiled output is not a demo subset — it is the standard library, end to end, emitted by the converter, transpiled Go to C#, then compiled by Roslyn. NOTE: don’t get too excited, this is fully compilable not fully runnable — that’s the next phase (underway; see the July 17 item above)! However, simple apps will run, try converting a real-world module. Read more about this milestone’s details and current status in the README.

Tag: stdlib-green-2026-07-10 · commit 5cc07f8f33


June 27, 2026 — The math package compiles clean

The full-conversion math package compiles clean — a core, widely-imported standard-library package, and with it a major step in the Phase 3 drive to compile the whole auto-converted standard library. The session that landed it greened nine full-conversion packages (unicode, internal/trace/event, unicode/utf16, internal/platform, image/color, runtime/internal/sys, runtime/internal/math, math/bits, and math) via 19 behaviorally-tested converter and generator fixes. The dominant theme was comprehensive untyped-constant typing, plus shadowing fixes, namespace-collision qualification, composite self-qualification, and relational-pattern guards.

Tag: math-green-2026-06-27 · commit 914d4bd72


May 5, 2025 — First full standard-library auto-conversion

The rewritten Go-based converter completed its first full standard-library auto-conversion: the whole Go standard library (~301 projects) converted end to end. “Converted” here meant the transpiler did not crash and every Go source file received a corresponding C# file — not yet that the emitted C# compiles. Driving this full conversion to a clean compile became Phase 3, finished on July 10, 2026 (above).

Tag: full-conversion-2025-05 (cc14584c7, May 11) · commit 6ca1c45b7


January 12, 2025 — The converter is rewritten in Go (“go2cs” version 2)

Major project restructuring — the “go2cs iteration 2” generation begins: the converter is re-implemented in Go on the official go/ast + go/types toolchain, replacing the original C# converter built on an ANTLR4 Go grammar; T4 templates are replaced by raw string literals; and Roslyn source generators take over the auto-generated ancillary code that supplies Go semantics at compile time. The ANTLR4/C# converter is retired.

Commit: 87465f5f5


November 19, 2022 — .NET 7.0, C# 11, and UTF-8 string literals

From the ANTLR4-era converter’s News:

Commit: d90f267d4


March 13, 2022 — v0.1.2 release

go2cs v0.1.2 is released — a tagged release of the mature ANTLR4-era converter. Converted code now targets .NET 6.0 / C# 10, using file-scoped namespaces and reduced indentation to better match the original Go code’s styling, with new command-line options for pre-C#-10-compatible output and ANSI brace style, options to skip GOOS/GOARCH- and cgo-targeted files, and the ANTLR4 grammar synchronized to the official source.

Tag: v0.1.2 (289b939db)


January 5, 2021 — Go as a scripting language for Unity and Godot

Example usages of go2cs allow Go to serve as the scripting language for the Unity and Godot game-engine platforms — see the GoUnity and GodotGo projects. The project has also been updated to .NET 5.0 and supports publishing as a self-contained executable.

Commits: efb497b3a, e5c2d7cbc


August 29, 2020 — First full conversion of the Go standard library (ANTLR4 era)

The initial conversion of the full Go source library completed without failing — the converter’s first end-to-end pass over the entire standard library, committed to src/go-src-converted. The warnings in that conversion’s build log laid out the road map of the parsing and conversion work remaining. Converted code at the time targeted .NET Core 3.1 / C# 8.0, and simple conversions depended on src/gocore — the small, manually-converted subset of the Go library that later became the curated baseline in src/core, since retired in favor of the converted standard library.

Commit: 8e2d6e8e6