GopherJS v1.21.0 - Go 1.21.13 Support

   |   3 minute read   |   Using 636 words

GopherJS v1.21.0 was published on June 26, 2026, and moves the project to Go 1.21.13 support. The most important change is the compiler and runtime update for Go 1.21, with matching work across builtins, reflect, slices, maps, unsafe handling, testing, and native overrides. This is a stable release, not a prerelease.

The full release notes and downloads are on the GitHub release page.

Go 1.21.13 support

GopherJS now targets Go 1.21.13, which is the center of this release. The notes show a long branch of Go 1.21 work, including updates to linking, reflect, reflectlite, abi, runtime code, godebug, slices, maps, and native overrides.

For users, the practical result is simple: code that depends on the Go 1.21 surface has a better chance of compiling cleanly through GopherJS. The release notes call out the new max, min, and clear builtins, plus optional new and replace override directives.

This is not just a version label change. Compatibility releases like this touch many small edges where the Go runtime model has to be represented in generated JavaScript. That is the dull work users mostly notice only when it is missing.

unsafe.Slice and index pointers

One important user visible fix is around index pointers, written as &s[i] in the notes. GopherJS now updates that path so unsafe.Slice can work, and so code can cast back into a slice after taking an index pointer.

The release also mentions fixes for int64 and uint64 indexes when creating index pointers. That matters for code that carries large numeric index values through generated JavaScript, where integer behavior can be a sharp edge.

This area is small in syntax, but not small in effect. Unsafe code tends to sit under libraries, not only in application code. A compiler fix there can remove failures in packages that users did not write directly.

Compiler correctness and method lookup

Several entries are about correctness rather than new surface area. The release notes mention fixes for method shadowing, ambiguity resolution in method sets, proxy conversion, identifier collisions in minified code with generics, and more nil aware checks.

These changes matter because they sit in places where compiled output can look fine until a specific type shape or call path appears. Method set ambiguity and shadowing are exactly the kind of issues that turn into confusing runtime behavior if the compiler picks the wrong symbol.

The generics minification fix is also worth calling out. Minified output is useful only if it remains semantically stable. A collision in that path is not a cosmetic problem; it can break production bundles in a way that is hard to inspect.

Runtime and test behavior

The runtime work is broad, but a few items stand out. GopherJS updates call stack handling so PC = 0 is allowed, changes runtime and godebug behavior for the panic nil flag, and sets testing.Testing to true when running tests.

Stack trace caller generation also gets faster when used by code such as t.Helper(). Test helpers often sit on hot paths during large suite runs, so this is one of those changes that can save time without requiring users to change code.

The release notes also call out improved math/bits speed and optimized call frames. That points to runtime polish rather than API changes. It is still useful, because generated JavaScript pays for runtime helpers in very concrete ways.

Upgrade notes

The main removal is deprecated node_syscall support. If a project still carries code, scripts, or assumptions around node_syscall, check that before moving to v1.21.0.

The notes include a dependency bump under /node-syscall, but the final change also expunges the deprecated support. Treat this as a cleanup signal. If your build or integration scripts still look for that path or behavior, remove that dependency before the upgrade.

Where to get it



denis256 at denis256.dev