Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions .agents/docs/2026-10-19-update-compat-httplib-0.62.0-plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Update compat:httplib to 0.62.0

## Scope and source

- Upstream: <https://github.com/yhirose/cpp-httplib/releases/tag/v0.62.0>.
- Add `0.62.0` to Linux, macOS and Windows; retain the existing `0.53.1` entries.
- Keep the Form B header-only recipe unchanged: the archive still ships one
`httplib.h` at its root (the leading `*` in `include_dirs` absorbs the
`cpp-httplib-0.62.0/` wrapper), and the generated anchor TU still gives the
package a lib target for consumers to link.
- Update the six example members (`httplib`, `httplib-tls`, `httplib-zlib`,
`httplib-brotli`, `httplib-zstd`, `httplib-no-exceptions`) to `0.62.0`.
Feature names and dependency shapes are unchanged.

## Archives and mirrors

The GitHub tag archive was downloaded twice and each copy hashed; both
downloads produced the same SHA-256:

| Version | SHA-256 |
| --- | --- |
| 0.62.0 | `7bba5949c56e772236432f69da03197fd4c12dc443455b9d81f6a05575431fc8` |

No GitCode configuration or token is available in this environment. The new
entries use plain upstream URLs, as allowed by `docs/cn-mirror.md`; the
existing 0.53.1 entries are untouched.

## Automatic updates

The descriptor declares `package.extensions.autoupdate` with the
`v${version}` tag template and the GitHub tag-archive URL, so future releases
are proposed by `openxlings/xpkgindex-update` without manual descriptor edits.
Since all three platforms use the same archive, the new version's URL and
SHA-256 live once in a leading `local versions` table and each platform
references `versions["0.62.0"]`, matching the updater's append-only layout.
The historical `0.53.1` entries remain byte-for-byte unchanged.

## Recipe and compatibility

- The upstream CMake `option(...)` set is byte-for-byte the same in 0.53.1 and
0.62.0 (diffed the two files). There is no new build switch to encode in
the descriptor.
- Upstream `target_link_libraries` is also unchanged: Threads on all
platforms, `ws2_32`/`crypt32` on Windows, and
CFNetwork/CoreFoundation/Security on Darwin. The descriptor already carries
those in `linux`/`macosx`/`windows` `ldflags`.
- The header grew from 747,115 to 846,648 bytes. The additions (SSE client,
WebSocket helpers, hardening) live entirely inside `httplib.h`: they add no
defines, no extra sources and no link requirements, so the recipe needs no
new feature entry.
- 0.62.0's own release note is a runtime fix: on Windows a pong timeout now
also wakes a blocked `read()`, and `read()` returns `Fail` rather than
`Timeout` for a connection that has closed. No descriptor impact.
- 0.62.0 upstream also understands wolfSSL and MbedTLS
(`CPPHTTPLIB_WOLFSSL_SUPPORT` / `CPPHTTPLIB_MBEDTLS_SUPPORT`). This index
has no `compat.wolfssl` or `compat.mbedtls`, so no feature is added; `tls`
remains OpenSSL-only, exactly as before.
- Feature set unchanged: `tls`, `zlib`, `brotli`, `zstd`, `no-exceptions`.

## Validation

- `mcpp xpkg parse --all-os pkgs/c/compat.httplib.lua` -> `parse OK` for
linux, macosx and windows with `0.62.0` and `0.53.1` resolved on each.
- Windows, local mcpp 2026.10.11.1 (CI pins 2026.10.1.2 in
`.github/workflows/validate.yml`), LLVM 23.1.3 / MSVC 14.44.35207:
- `mcpp test -p httplib` -> 1 passed; 0 failed.
- `mcpp test -p httplib-zlib` -> 1 passed; 0 failed.
- `mcpp test -p httplib-brotli` -> 1 passed; 0 failed.
- `mcpp test -p httplib-no-exceptions` -> 1 passed; 0 failed.
- `mcpp test -p httplib-tls` -> blocked before compiling `compat.httplib`:
the `compat.openssl` 3.5.1 install hook on Windows needs a Perl with
`Locale::Maketext::Simple` (upstream's Configure), and this host has no
Perl at all. Environmental, not caused by this update; the mirror was
forced to GLOBAL because `mirror = "auto"` otherwise hangs trying the CN
source. CI decides this leg.
- `mcpp test -p httplib-zstd` -> blocked before compiling `compat.httplib`:
`compat.zstd` 1.5.7 unpacking fails on Windows because the upstream tag
archive contains the symlink `tests/cli-tests/bin/unzstd -> zstd`, which
xlings cannot materialise. The package and this member's dependency shape
are unchanged by this update, so the failure is pre-existing and
environmental; CI decides this leg.
- The Linux and macOS legs are left to CI.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@

### Added

- **`compat.httplib` 0.62.0。** 在 `0.53.1` 之外新增版本键(旧键保留)。仍是纯头文件 Form B:
归档根目录仍只有一份 `httplib.h`(747,115 → 846,648 字节,增量是 SSE 客户端、WebSocket
辅助与加固,全部落在头内,不引入 define、源文件或链接依赖),描述符的内联构建无需改动。
上游 CMake 的 `option()` 集合与 `target_link_libraries` 在 0.53.1→0.62.0 之间逐项相同
(两版实测 diff),三平台 ldflags 照旧。0.62.0 上游认识 wolfSSL/MbedTLS 后端,但本索引
没有对应的 compat 包,`tls` 仍只接 OpenSSL,不新增 feature。实测(Windows / mcpp
2026.10.11.1 / LLVM 23.1.3 + MSVC 14.44):`mcpp xpkg parse` OK;`httplib`、`httplib-zlib`、
`httplib-brotli`、`httplib-no-exceptions` 各 1 passed。`httplib-tls` 与 `httplib-zstd`
在本机都止步于依赖安装、未编到本包:`compat.openssl` 3.5.1 的 Windows 安装钩子需要带
`Locale::Maketext::Simple` 的 Perl,而本机没有 Perl;`compat.zstd` 1.5.7 的上游 tag 归档含
符号链接 `tests/cli-tests/bin/unzstd -> zstd`,Windows 上 xlings 无法创建。两项都与本次
改版无关,交 CI 裁决。六个测试成员同步改到 0.62.0。
- **`compat.wolfssl` 5.9.4。** wolfSSL(TLS/crypto)以 C 源码 compat 形态收录,上游最新稳定
tag 为 `v5.9.4-stable`。上游的 autotools/CMake 都会在编译前生成 `wolfssl/options.h`,而内联
描述符无法运行 configure,因此把该步骤的两项输出原样带入:`sources` 逐条抄自上游 CMake 默认
Expand Down
10 changes: 10 additions & 0 deletions pkgs/c/compat.httplib.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
local versions = {
["0.62.0"] = {
url = "https://github.com/yhirose/cpp-httplib/archive/refs/tags/v0.62.0.tar.gz",
sha256 = "7bba5949c56e772236432f69da03197fd4c12dc443455b9d81f6a05575431fc8",
},
}

-- Form B header-only descriptor for cpp-httplib. Optional backends stay off
-- unless a consumer requests the corresponding mcpp feature.
package = {
Expand All @@ -24,18 +31,21 @@ package = {
url = "https://github.com/yhirose/cpp-httplib/archive/refs/tags/v0.53.1.tar.gz",
sha256 = "185af9587e270de9a3bfee234c6740f02e82265da33c7a41f97e02ee42f979d2",
},
["0.62.0"] = versions["0.62.0"],
},
macosx = {
["0.53.1"] = {
url = "https://github.com/yhirose/cpp-httplib/archive/refs/tags/v0.53.1.tar.gz",
sha256 = "185af9587e270de9a3bfee234c6740f02e82265da33c7a41f97e02ee42f979d2",
},
["0.62.0"] = versions["0.62.0"],
},
windows = {
["0.53.1"] = {
url = "https://github.com/yhirose/cpp-httplib/archive/refs/tags/v0.53.1.tar.gz",
sha256 = "185af9587e270de9a3bfee234c6740f02e82265da33c7a41f97e02ee42f979d2",
},
["0.62.0"] = versions["0.62.0"],
},
},

Expand Down
2 changes: 1 addition & 1 deletion tests/examples/httplib-brotli/mcpp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ name = "httplib-brotli-tests"
version = "0.1.0"

[dependencies.compat]
httplib = { version = "0.53.1", features = ["brotli"] }
httplib = { version = "0.62.0", features = ["brotli"] }
2 changes: 1 addition & 1 deletion tests/examples/httplib-no-exceptions/mcpp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ name = "httplib-no-exceptions-tests"
version = "0.1.0"

[dependencies.compat]
httplib = { version = "0.53.1", features = ["no-exceptions"] }
httplib = { version = "0.62.0", features = ["no-exceptions"] }
2 changes: 1 addition & 1 deletion tests/examples/httplib-tls/mcpp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ name = "httplib-tls-tests"
version = "0.1.0"

[dependencies.compat]
httplib = { version = "0.53.1", features = ["tls"] }
httplib = { version = "0.62.0", features = ["tls"] }
2 changes: 1 addition & 1 deletion tests/examples/httplib-zlib/mcpp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ name = "httplib-zlib-tests"
version = "0.1.0"

[dependencies.compat]
httplib = { version = "0.53.1", features = ["zlib"] }
httplib = { version = "0.62.0", features = ["zlib"] }
2 changes: 1 addition & 1 deletion tests/examples/httplib-zstd/mcpp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ name = "httplib-zstd-tests"
version = "0.1.0"

[dependencies.compat]
httplib = { version = "0.53.1", features = ["zstd"] }
httplib = { version = "0.62.0", features = ["zstd"] }
2 changes: 1 addition & 1 deletion tests/examples/httplib/mcpp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ name = "httplib-tests"
version = "0.1.0"

[dependencies.compat]
httplib = "0.53.1"
httplib = "0.62.0"
Loading