Crypto News

Everything You Have to Know About Go 1.24

Today the Go team is excited to release Go 1.24, which you can get by visiting the download page.

Go 1.24 comes with many improvements over Go 1.23. Here are some of the notable changes; for the full list, refer to the release notes.

Language changes

Go 1.24 now fully supports generic type aliases: a type alias may be parameterized like a defined type. See the language spec for details.

Performance improvements

Several performance improvements in the runtime have decreased CPU overhead by 2–3% on average across a suite of representative benchmarks. These improvements include a new builtin map implementation based on Swiss Tables, more efficient memory allocation of small objects, and a new runtime-internal mutex implementation.

  • The go command now provides a mechanism for tracking tool dependencies for a module. Use go get -tool to add a tool directive to the current module. Use go tool [tool name] to run the tools declared with the tool directive. Read more on the go command in the release notes.
  • The new test analyzer in go vet subcommand reports common mistakes in declarations of tests, fuzzers, benchmarks, and examples in test packages. Read more on vet in the release notes.

Standard library additions

  • The standard library now includes a new set of mechanisms to facilitate FIPS 140-3 compliance. Applications require no source code changes to use the new mechanisms for approved algorithms. Read more on FIPS 140-3 compliance in the release notes. Apart from FIPS 140, several packages that were previously in the x/crypto module are now available in the standard library.
  • Benchmarks may now use the faster and less error-prone testing.B.Loop method to perform benchmark iterations like for b.Loop() { ... } in place of the typical loop structures involving b.N like for range b.N. Read more on the new benchmark function in the release notes.
  • The new os.Root type provides the ability to perform filesystem operations isolated under a specific directory. Read more on filesystem access in the release notes.
  • The runtime provides a new finalization mechanism, runtime.AddCleanup, that is more flexible, more efficient, and less error-prone than runtime.SetFinalizer. Read more on cleanups in the release notes.

Improved WebAssembly support

Go 1.24 adds a new go:wasmexport directive for Go programs to export functions to the WebAssembly host, and supports building a Go program as a WASI reactor/library. Read more on WebAssembly in the release notes.


Please read the Go 1.24 release notes for the complete and detailed information. Don’t forget to watch for follow-up blog posts that will go in more depth on some of the topics mentioned here!

Thank you to everyone who contributed to this release by writing code and documentation, reporting bugs, sharing feedback, and testing the release candidates. Your efforts helped to ensure that Go 1.24 is as stable as possible. As always, if you notice any problems, please file an issue.

Enjoy Go 1.24!


Credits: Junyang Shao, on behalf of the Go team

Photo by Markus Winkler on Unsplash

This article is available on The Go Blog under a CC BY 4.0 DEED license.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button