跳到正文
Hacker News·· 2026-10-29AI 评分46

noalloc:用于在 Golang 中强制零堆分配的工具与库

noalloc: Tooling and libraries to enforce zero heap allocations in Golang

AI 导读

noalloc 通过 CLI 检查 Golang 函数的完整调用树,定位堆分配代码行,并支持豁免指定代码。项目还提供固定容量数据结构、算法及零分配 JSON 编码器与解码器,使用时需要 Go 1.27 或更高版本。该仓库由 AI 编写,属于实验性项目,已在 The Consensus 的 web service 和代码搜索引擎中使用。

来源:Hacker News · github.com