Skip to content

Releases: findstr/silly

v0.7.1

10 Apr 05:17
04dd5c7

Choose a tag to compare

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/

v0.7.0

29 Dec 06:06

Choose a tag to compare

v0.7.0 (2025-12-28)

🚀 Key Changes

⚠️ Breaking Changes

  • Lua runtime upgraded to 5.5.0.
  • New unified, namespaced package structure (silly.net, silly.store, etc.).
  • Networking APIs fully redesigned for coroutine-first, object-oriented usage with unified timeout support.
  • Standardized error handling: Switched to string-based descriptions and refined EOF behavior.
  • Legacy API removal: Removed legacy cluster.rpc and cluster.msg.

✨ New Features

  • Database Enhancements: Added MySQL caching_sha2_password support, connection pooling, and a refreshed Redis client API.
  • Cluster & Service Discovery: New peer-based cluster implementation (experimental) and Etcd v3 client.
  • Public C API & Thread Pool: Support for embedding workloads and offloading blocking tasks via silly.hive.
  • Developer Tools: New interactive Lua REPL, Dockerfile support, and Zlib compression.

🛠️ Improvements & Fixes

  • Protocol Correctness: Major stability improvements for HTTP/2 (flow control), gRPC, and WebSocket (RFC 6455).
  • Security: Crypto reimplemented on top of OpenSSL with expanded RSA / EC / JWT support.
  • Logging Robustness: Deterministic table truncation and safe fallback for unsupported types.
  • Developer Experience: Full LuaLS annotations for all APIs and a new official documentation site.

📖 Documentation: https://findstr.github.io/silly/


🚀 关键改动

⚠️ 不兼容变更 (Breaking Changes)

  • Lua 运行时升级至 5.5.0
  • 全新的统一命名空间包结构(如 silly.net, silly.store 等)。
  • 网络 API 全面重构:采用面向对象及协程优先设计,并提供统一的超时管理
  • 错误处理标准化:改用字符串描述错误,并明确了 EOF(流结束)的返回值行为。
  • 旧版本清理:移除了遗留的 cluster.rpccluster.msg 接口。

✨ 新特性

  • 数据库增强:新增 MySQL caching_sha2_password 认证与连接池支持;重构了 Redis 客户端 API
  • 集群与服务发现:新增 peer 模式集群实现(实验性)以及 Etcd v3 客户端支持。
  • 公共 C API 与线程池:支持嵌入式集成,并通过 silly.hive 线程池卸载阻塞任务。
  • 开发者利器:新增交互式 Lua REPL、官方 Dockerfile 支持及 Zlib 压缩功能。

🛠️ 优化与修复

  • 协议精进:主要提升 HTTP/2(流量控制)gRPCWebSocket(RFC 6455 合规) 的稳定性。
  • 安全加固:基于 OpenSSL 重新实现 crypto,统一加密语义并扩展 RSA / EC / JWT 支持。
  • 日志系统更加稳健:表结构截断行为确定化,且不支持的值类型将安全降级为字符串。
  • 开发体验 (DX):所有公开 API 均补全 LuaLS 注解,配套全新官方文档站。

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

v0.6.0

18 Dec 04:07

Choose a tag to compare

Bug fixes:
  • Fix websocket frame header byte order
  • Fix http2 scheme header && reset_frame error code
  • Fix http2 window handle
  • Fix some lint warnings
New features:
  • Add grpc support
  • Add signal support
  • Add cancel for timer and redesign node cache
  • Add metrics of prometheus
  • Add distributed tracing via log(expriemental)
  • Add cluster.lua to provide a more flexible alternative to cluster.rpc and cluster.msg
  • Add annotations for LuaLS/lua-language-server to enable type checking and enhance navigation capabilities
  • Support TLS sni cert
  • Support HTTP automatic switching between http and http2
  • Support ETCDv3 client(kv, lease, watch) partially
  • Handle websocket connection close gracefully
  • Remove redis response of '\r\n'
  • Refine endless loop warning introduce tracebacks for improved problem diagnosis
  • Use clang-format to unify code style
  • Reimplement startup mechanism and module layout
  • Reimplement logger to support log level(debug, info, warn, error) and more faster

v0.5.0

28 Jan 01:40

Choose a tag to compare

Bug fixes:

  • fix incorrect session type in netpacket.rpcpack
  • fix incorrect call of lua_gc
  • handle socket close event in send_msg_tcp/send_msg_udp

New features:

  • add cluster module to provide some help for cluster networking
  • use parameters instead of environment variables to override startup variables (#984308b)
  • add examples for timer,socket,RPC,HTTP,WebSocket
  • refine core.timeout for a large number of timer events(delay creating a task for timer event can reduce the memory usage to 30% of the original)
  • crypto.base64encode support URL safe code and add crypto.sha256, crypto.digestsign, crypto.digestverify
  • TLS support SNI, ALPN
  • support HTTP2
  • refine patch(more flexible, more powerful)
  • more monitor data(timer event info, more memory info)

v0.4.0

02 Nov 07:02

Choose a tag to compare

Bug fixes:

  • fix timer session race condition
  • fix tls.read, may read broken data
  • fix dns name cache
  • fix sys.socketq(renamed from sys.socketdispatch) auth race condition
  • fix dns session overflow
  • fix netpacket when hash conflict
  • fix core.exit, no code should be run after core.exit()
  • fix saux.rpc when more than one message pops up in a loop
  • fix saux.rpc timer leak

New features:

  • dns support ipv6 server address
  • http support dom parser
  • add wakegroup for waiting for a collection of coroutines to finish
  • add fd round back check for sys.socket
  • add monitor thread to monitor slow events(events that take too long to process)
  • abstract task(special use of coroutine) for wrapper of event(socket, timer)
  • console add task/net info for debug
  • core.env support number index key
  • add flow control
  • upgrade to lua5.4 and enable generational gc by default

v0.3.0

01 Oct 00:21

Choose a tag to compare

Bug fixes:

  • netpacket expand queue
  • netstream.check and netstream gc
  • profiler timestamp
  • aes cbc mode
  • redis reconnect the dbindex will be reseted

New features:

  • add ssl for http.client
  • add base64
  • add hotpatch for lua code
  • add pidfile
  • import jemalloc as default memory allocator
  • import accept4 in linux
  • import cpu affinity which can be user defined in linux
  • config file add 'include' command
  • remove old rpc and add saux.rpc and saux.msg to support rpc/msg server
  • socket add 'tag' for more easy debug
  • config file support shell environment
  • support multicast in data send level
  • synchroize zproto to support float
  • dns support cname nested
  • socket.write support pass string array as parameter
  • redis support pipeline
  • core.write support lightuserdata/string/string array
  • process the condition of run out of fd when accept
  • remove lualib-log and refine daemon log to replace it

v0.2.2

03 Jan 04:59

Choose a tag to compare

add HISTORY.md

v0.2.1

09 Oct 08:46

Choose a tag to compare

Bug fix release

v0.2

08 Aug 09:57

Choose a tag to compare

Update README.md

v0.1

03 Jan 07:31

Choose a tag to compare

v0.1 Pre-release
Pre-release

first version