_content/blog/go1.21.md
Today the Go team is thrilled to release Go 1.21, which you can get by visiting the download page.
Go 1.21 is packed with new features and improvements. Here are some of the notable changes; for the full list, refer to the release notes.
default.pgo is present in the main package’s directory, the go command
will use it to enable a PGO build. See the PGO documentation for
more details. We’ve measured the impact of PGO on a wide set of Go programs and
see performance improvements of 2-7%.go tool now supports backward
and forward language compatibility.In addition to the performance improvements when enabling PGO:
Go 1.21 adds an experimental port for WebAssembly System Interface (WASI),
Preview 1 (GOOS=wasip1, GOARCH=wasm).
To facilitate writing more general WebAssembly (Wasm) code, the compiler also
supports a new directive for importing functions from the Wasm host:
go:wasmimport.
Thanks to everyone who contributed to this release by writing code, filing bugs, sharing feedback, and testing the release candidates. Your efforts helped to ensure that Go 1.21 is as stable as possible. As always, if you notice any problems, please file an issue.
Enjoy Go 1.21!