网页 综合 更新时间 2026-11-14 16:29:17

Go 1.24 is released! - The Go Programming Language

自动蜘蛛 go.dev 正文约 3116 字
Common problems companies solve with Go
Stories about how and why companies use Go
How Go can help keep you secure by default
The official Go language specification
A complete introduction to building software with Go
Reference documentation for Go's standard library
Learn what's new in each Go release
Tips for writing clear, performant, and idiomatic Go code
Videos from prior events
Meet other local Go developers
Learn and network with Go developers from around the world
The Go project's official blog.
Get help and stay informed from Go
Junyang Shao, on behalf of the Go team 11 February 2025
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.
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.
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 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.
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.
Next article: Extensible Wasm Applications with Go Previous article: Go Developer Survey 2024 H2 Results Blog Index
访问原文 返回搜索 https://go.dev/blog/go1.24
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。