v0.7.1 (Apr 10, 2026)
🚀 Key Changes
✨ New Features
- Concurrency Primitives: Added
sync.singleflightto deduplicate concurrent in-flight requests. - High-Resolution Timing: New
perf.hrtimefor nanosecond-precision timing. - Network Addressing:
net.addrmodule extracted for centralizedhost:portparsing and handling. - Compression Codecs: Added Snappy and LZ4 support in the
compressmodule.
🔄 Changes
- Logger: Redesigned with a ring buffer and asynchronous flushing for reduced write latency.
- JSON: Encoding module rewritten in C for improved performance and RFC 8259 compliance.
- DNS Resolver: Reimplemented with a C-based wire format parser.
- Cluster Protocol: Packet header expanded to 4 bytes with enforced size limits — may affect protocol compatibility.
- Hive Workers: Now inherit package path and enforce restricted module access.
- Profiler: Renamed from
profilertoperf. - Timer: Refactored to use a unified command buffer; shutdown sequence now uses explicit
OP_EXITtermination; refine locking in flipbuf and timer pool.
🛠️ Fixes
- TLS: Propagate handshake/write errors to callers; fix use-after-free in server ALPN handling.
- Signal: Fix async-signal-unsafe handler and cross-thread
lua_sethookrace condition. - HTTP/2: Validate
:statusin responses; skip content-length check for no-body responses; maskWINDOW_UPDATEreserved bit; remove duplicate SETTINGS ACK during handshake. - Worker: Fix
lua_closeordering to prevent use-after-free.
📖 Documentation: https://findstr.github.io/silly/
🚀 关键改动
✨ 新特性
- 并发原语: 新增
sync.singleflight,用于合并相同的并发请求,避免重复执行。 - 高精度计时: 新增
perf.hrtime,提供纳秒级精度的时间测量能力。 - 网络地址模块: 抽取
net.addr模块,统一处理host:port的解析与管理。 - 压缩编解码器: 在
compress模块中新增 Snappy 和 LZ4 支持。
🔄 变更
- 日志系统: 重新设计,采用环形缓冲区与异步刷新机制,降低写入延迟。
- JSON 模块: 编码模块用 C 重写,性能更优,符合 RFC 8259 规范。
- DNS 解析器: 基于 C 实现的 wire format 解析器重写,性能与可靠性提升。
- 集群协议: 数据包头扩展至 4 字节,并强制校验包大小上限——可能影响协议兼容性。
- Hive 工作线程: 现在会继承 package path,并限制模块访问权限。
- Profiler: 模块从
profiler重命名为perf。 - 定时器: 重构为统一命令缓冲区;关闭流程改为通过显式
OP_EXIT命令终止线程;优化 flipbuf 与 timer pool 中的加锁逻辑。
🛠️ 修复
- TLS: 将握手/写入错误正确传递给调用方;修复服务端 ALPN 处理中的 use-after-free 问题。
- Signal: 修复异步信号不安全的处理函数及跨线程
lua_sethook竞态条件。 - HTTP/2: 校验响应中的
:status字段;对无响应体的请求跳过 content-length 校验;屏蔽WINDOW_UPDATE保留位;移除握手阶段重复发送的 SETTINGS ACK。 - Worker: 修正
lua_close调用顺序,防止 use-after-free。