Skip to content

UVHTTP v2.7.1 — Embedding & CI Quality

Choose a tag to compare

@adam-ikari adam-ikari released this 26 Aug 10:23
· 140 commits to main since this release
c46b9cf

UVHTTP v2.7.1 Release Notes

Release Date: 2026-08-26
Version: 2.7.1
Type: Patch Release (Quality & Embedding)

Overview

UVHTTP v2.7.1 is a quality-focused patch release that fixes the ci-fuzz CI pipeline (broken for 5 consecutive days), makes embedding via add_subdirectory work out of the box, and introduces the performance regression gate to prevent silent performance degradation.

🛠 Key Changes

1. ci-fuzz CI 修复 (PR #364)

Problem: ci-fuzz 连续失败 5 天(2026-08-20 ~ 08-24)。ci-fuzz 是唯一用 clang 编译的工作流,项目默认 C99 + -Werror,clang 在 C99 下对同 TU 内重复 typedef 报 -Wtypedef-redefinition(GCC 不报,所以主 CI 一直绿)。

Fix:

  • CMAKE_C_STANDARD 99 → 11(与 PHILOSOPHY.md "实际构建使用 C11" 对齐)
  • 删除未使用的 uvhttp_validate_buffer_state(clang -Wunused-function 报错)
  • fuzz_router 链接补齐 libminiz.a / libxxhash.a
  • 移除引用已不存在 API 的过时 fuzz_request harness

Verification: fuzz_router 5s 跑 442K execs, 0 crash, 0 timeout

2. 嵌入构建修复 (PR #365)

Problem: uvhttp public headers 包含 llhttp.h、<uv.h>、xxhash.h、uthash.h、mbedtls 头文件,但这些依赖在 CMake 中被标记为 PRIVATE,嵌入者通过 add_subdirectory 集成时找不到头文件。

Fix:

  • libuv/xxhash/llhttp/mbedtls 从 PRIVATE → PUBLIC 链接
  • PUBLIC include dirs 添加 deps/uthash/src(uthash 为 header-only 库)

Verification: 嵌入测试项目 add_subdirectory 构建成功,服务器启动/停止正常

3. 性能回归门禁 (PR #366)

新增 scripts/performance/regression_check.py:

  • CI 基准测试后自动对比内置基线(/ 83K, /json 81K, /large 5.7K RPS)
  • 阈值 10%,RPS 低于基线 90% 则 CI 失败
  • 仅在 PR 和 pre-release push 时触发,workflow_dispatch 不阻塞(开发期手动基准)

Verification: PASS 场景 exit=0,FAIL 场景(70K RPS)exit=1 正确报错

✅ Testing

Item Result
单元测试 101/101 通过
ASan gate PASS
UBSan gate PASS
build-matrix (5 组合) 全部通过
ci-fuzz 修复后本地验证通过
嵌入验证 add_subdirectory 构建成功

🔒 Compatibility

  • 零破坏性变更: patch release,API 完全向后兼容
  • 升级无需改动: 现有代码无需修改

📚 Documentation

  • docs/guide/CHANGELOG.md: 新增 v2.7.1 条目
  • docs/embedding-checklist.md: 勾选 4 项构建集成验证项
  • Brain roadmap: 更新 v2.7.x 完成项

🔗 Links

📈 Next Steps

v2.8.x 将聚焦性能优化与平台扩展:io_uring 探索(P2)、内存分配优化(P2)、新嵌入者接入(P1)、macOS/FreeBSD 支持(P3)。


Risk Level: 🟢 Low (patch release, backward compatible)
Testing: ✅ Comprehensive (101/101 tests, ASan, UBSan, build-matrix)