GopherJS v1.21.0 - Go 1.21.13 Runtime Support

GopherJS v1.21.0 was published on June 26, 2026, and moves the compiler support line to Go 1.21.13. For teams that compile Go into JavaScript for browser or Node based data processing, the important change is the Go 1.21 runtime surface: unsafe.Slice, updated maps and slices, new builtins, and better behavior around method resolution and nil checks.

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

Go 1.21.13 support is the main change

This release is mostly a compatibility release, not a feature bundle. The Go 1.21 line starts in PR 1400, with final support landing through PR 1451. That matters when shared Go code is part of a web processing path and has to compile cleanly into JavaScript without carrying a separate older language target.

The notes call out updates to reflect, reflectlite, and abi in PR 1417, plus the max, min, and clear builtins in PR 1419. Maps and slices were also updated for Go 1.21 in PR 1438. For data engineers, the value is practical: validation, shaping, and client side processing code can stay closer to the Go version used elsewhere in the stack.

The release also adds optional override directives for new and replace in PR 1414. That is a small item in the notes, but it belongs in the same compatibility bucket. Build overrides are often where platform teams carry local runtime patches.

Pointer and slice behavior matters for generated JavaScript

The most concrete runtime change is the update to index pointers, written as &s[i], so unsafe.Slice can work and cast back into a slice. That landed with the broader unsafe.Slice work in PR 1424. A follow up fix for int64 and uint64 indexes when creating index pointers appears in PR 1434.

This is the sort of change that does not read as a data pipeline feature, but it affects correctness in code that parses, buffers, or reshapes records before they move into storage. GopherJS still has to map Go memory expectations onto JavaScript behavior. Pointer and slice edge cases are where a small compiler mismatch can turn into bad output rather than a clean failure.

The release also includes more native override updates for Go 1.21. That is internal compiler maintenance, but it is not noise. For a compiler that targets JavaScript, native overrides are part of the contract between standard library behavior and the generated runtime.

Correctness fixes touch method sets and minified output

Method resolution gets a specific fix in PR 1449, which addresses shadowing and ambiguity in method sets. This matters for embedded types and interface matching. If a shared model or parser type compiles differently under GopherJS than under normal Go, the resulting defect is usually hard to diagnose from a browser trace.

The release also adds more nil aware checks in PR 1435 and fixes a proxy conversion issue in PR 1441. These are not broad platform features. They are boundary fixes around generated code behavior, and that is the right place to spend time in a compiler release.

One web processing detail is worth calling out: PR 1442 fixes identifier collisions in minified code with generics. Minification is often treated as a packaging concern, but collisions in generic generated code are runtime risk. This is especially relevant when compiled Go modules are shipped into browser workers or Node tasks that run extraction or normalization logic.

Runtime and test behavior get operator attention

Stack trace caller generation is faster when used in code such as t.Helper(). The notes also mention call stack handling that allows PC = 0 in PR 1439, testing.Testing being set during tests in PR 1436, and runtime package work for the panic nil flag in PR 1445.

Those changes are mostly about alignment with Go behavior and better diagnostics. For platform operators, that is useful in a narrow way: test suites should behave more like normal Go, and failure traces should cost less in helper heavy tests.

There is also a performance note for math/bits in PR 1456. The release notes do not give a benchmark, so it should be treated as targeted runtime work rather than a broad throughput claim. CI maintenance also shows up through updated linter and Node usage in PR 1455, plus pinned Darwin CI in PR 1458.

Upgrade notes

GopherJS v1.21.0 is a stable release, not a prerelease. The main migration item is the removal of deprecated node_syscall support in PR 1450. Any build, test, or packaging script that still expects that old path should be changed before moving to this tag.

The release is also tied to Go 1.21.13 support, so mixed fleets should check their compiler and runtime assumptions together. If GopherJS is only used for a small browser helper, the upgrade may be straightforward. If it sits in a shared data processing library, run the normal Go tests and the compiled JavaScript tests before publishing generated artifacts.

Where to get it