Skip to content

v0.7.1

Latest

Choose a tag to compare

@findstr findstr released this 10 Apr 05:17
· 8 commits to master since this release
04dd5c7

v0.7.1 (Apr 10, 2026)

🚀 Key Changes

✨ New Features

  • Concurrency Primitives: Added sync.singleflight to deduplicate concurrent in-flight requests.
  • High-Resolution Timing: New perf.hrtime for nanosecond-precision timing.
  • Network Addressing: net.addr module extracted for centralized host:port parsing and handling.
  • Compression Codecs: Added Snappy and LZ4 support in the compress module.

🔄 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 profiler to perf.
  • Timer: Refactored to use a unified command buffer; shutdown sequence now uses explicit OP_EXIT termination; 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_sethook race condition.
  • HTTP/2: Validate :status in responses; skip content-length check for no-body responses; mask WINDOW_UPDATE reserved bit; remove duplicate SETTINGS ACK during handshake.
  • Worker: Fix lua_close ordering 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。

📖 文档地址:https://findstr.github.io/silly/