Go Core Team Flags Libraries Using //go:linkname for Go 1.23 Compatibility
The Go core team leader rsc recently marked several popular Go libraries that rely on the //go:linkname directive as incompatible with the upcoming Go 1.23 release, prompting urgent fixes and discussion about runtime symbol linking and migration timelines.
During an afternoon work session, the author noticed a sudden stir in the Chinese Go community when rsc, the head of the Go core team, publicly flagged several well‑known Go libraries for violating the upcoming Go 1.23 compatibility rules.
The offending code resides in src/runtime/malloc.go , where the use of the //go:linkname directive to reference internal symbols, including those in the runtime package, is now prohibited.
Testing of go 1.23rc1 via the Homebrew formula Homebrew/homebrew-core#175310 revealed compilation errors in the flagged libraries, leading to multiple related GitHub issues that request immediate remediation.
rsc’s comments indicate that the //go:linkname usage is overly aggressive in some projects, but he also expressed a willingness to keep widely used libraries like bytedance/sonic functional without changes, asking contributors to identify any missing symbols and file issues in the golang/go repository.
The author argues that the core team could allow more time for migration, emphasizing the importance of Go’s compatibility guarantees.
Recommended Reading
10 Go Tips to Boost Productivity
Why Go Doesn’t Adopt Rust‑Style Error Handling
Future Directions of Go: Principles for Standard Library v2
Reference
src/runtime/malloc.go: https://github.com/golang/go/blob/master/src/runtime/malloc.go#L969C1-L980C27
IT Services Circle
Delivering cutting-edge internet insights and practical learning resources. We're a passionate and principled IT media platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.