Successfully migrated libsql-server from Hyper 0.14 to Hyper 1.0 ecosystem. This is a major upgrade affecting the entire HTTP stack.
- hyper: 0.14 → 1.0
- http: 0.2 → 1.0
- http-body: 0.4 → 1.0
- tonic: 0.11 → 0.12
- prost: 0.12 → 0.13
- rustls: 0.21 → 0.23
- tokio-rustls: 0.24 → 0.26
- axum: 0.6 → 0.7
- hyper-util: Added 0.1
- http-body-util: Added 0.1
- hyper-tungstenite: 0.13 → 0.19
- tokio-tungstenite: 0.24 → 0.28
- File:
libsql-server/src/http/user/mod.rs:473 - Issue:
http2_only(false)- method takes 0 arguments, not 1 - Fix: Removed the boolean argument
- Status: ✅ RESOLVED
- File:
bindings/c/Cargo.toml:20 - Issue: Used
http = "1.1.0"while workspace useshttp = "1.0" - Fix: Changed to
http = "1.0"for version consistency - Status: ✅ RESOLVED
- File:
libsql-server/src/rpc/mod.rs - Issue:
TlsIncomingStreamhad race condition where pending handshakes could stall - Fix: Rewrote using
FuturesUnordered<JoinHandle<...>>for proper concurrent TLS handshake management - Status: ✅ RESOLVED
- Files:
libsql/src/database.rs,bindings/c/src/lib.rs - Issue: gRPC requires HTTP/2, connectors only enabled HTTP/1.1
- Fix: Added
.enable_http2()to hyper-rustls connector builders - Status: ✅ RESOLVED
- File:
.github/workflows/golang-bindings.yml - Issue:
LIBSQL_PRIMARY_URLused port 8080 (HTTP/Hrana) but embedded replicas need port 5001 (gRPC) - Fix: Changed URL from
http://127.0.0.1:8080tohttp://127.0.0.1:5001 - Status: ✅ READY FOR TESTING
- File:
libsql-ffi/build.rs - Issue:
pcre2_internal.hincorrectly included as source file - Fix: Removed header from source patterns
- Status: ✅ RESOLVED
- File:
libsql-server/src/rpc/mod.rs:73 - Issue: CA cert reading used blocking
std::fsin async context - Fix: Changed to
tokio::fs::read_to_string - Status: ✅ RESOLVED
| Workflow | Risk Level | Reason |
|---|---|---|
| rust.yml | 🔴 HIGH | Full test suite, tokio_unstable, compilation + tests |
| golang-bindings.yml | 🔴 HIGH | Direct server startup, gRPC on port 5001, HTTP on 8080 |
| libsql-server-release.yml | 🟡 MEDIUM | Cross-platform builds with tokio_unstable |
| publish-server.yml | 🟡 MEDIUM | Docker image builds |
| server-pr-images.yml | 🟡 MEDIUM | PR Docker builds |
| nemesis.yml | 🟡 MEDIUM | Integration tests with sqld |
| c-bindings.yml | 🟢 LOW | Pure compilation, no server runtime |
| extensions-test.yml | 🟢 LOW | Extension testing only |
| brew-test.yml | 🟢 LOW | CLI installation only |
| publish-crsqlite.yml | 🟢 LOW | C extension build |
| release-drafter.yml | 🟢 LOW | Release notes only |
| release-libsql.yml | 🟢 LOW | C library build |
| sqlite3.yml | 🟢 LOW | C/SQLite with Wasm |
| Port | Used By | Protocol | Purpose |
|---|---|---|---|
| 5001 | golang-bindings.yml | gRPC | Embedded replica replication |
| 8080 | golang-bindings.yml | HTTP/Hrana | Health checks, HTTP API |
| Workflow | Status | Notes |
|---|---|---|
| Run Checks | ✅ PASS | Format, check, clippy - build error fixed |
| c-bindings | ✅ PASS | C library build |
| c-bundle-validate | ✅ PASS | Bundle up-to-date check |
| CR SQLite C Tests | ✅ PASS | CR SQLite tests |
| CR SQLite Rust Tests | ✅ PASS | CR SQLite Rust tests |
| Extensions Tests | ✅ PASS | SQL extensions |
| Windows checks | ✅ PASS | Windows build |
| golang-bindings | 🧪 READY | Port 5001 fix applied, needs testing |
| cargo-udeps | False positives for hyper deps |
The cargo-udeps check reports unused dependencies for:
hyper-rustls- Used inlibsql/src/database.rshttp-body-util- Used throughout the codebasetower-http- Used in HTTP server
These are false positives due to how the dependencies are used (through re-exports or trait implementations). The --each-feature flag causes these to be flagged incorrectly.
Workaround: These can be ignored or the check can be modified to use --all-features instead.
- ✅ TLS handshake race condition fixed (FuturesUnordered rewrite)
- ✅ HTTP/2 properly enabled for gRPC
- ✅ Build errors resolved
- ✅ TLS handshake timeout (30 seconds)
- ✅ Concurrent handshake limit (1000 max, with backpressure)
- ✅ Async file I/O consistency (CA cert reading now async)
- TLS Handshake Timeout: 30 second timeout prevents slowloris attacks
- Handshake Limit: Maximum 1000 concurrent TLS handshakes with backpressure
- Proper Async I/O: All file operations are now non-blocking
- ALPN Configuration: Proper HTTP/2 and HTTP/1.1 protocol negotiation
| File | Rating | Notes |
|---|---|---|
rpc/mod.rs |
🟡 NEEDS_IMPROVEMENT | Handshake limit added, but no global connection limits |
http/user/mod.rs |
🟡 NEEDS_IMPROVEMENT | No HTTP timeouts configured yet |
net.rs |
🟢 SECURE | Clean abstraction, delegates security |
database.rs |
🟡 NEEDS_IMPROVEMENT | No cert validation control |
- Add global connection limits (semaphore-based)
- Add per-IP rate limiting
- Add HTTP request/idle timeouts
- Consider strict CA cert parsing instead of
add_parsable_certificates - Add metrics for TLS handshake failures/timeouts
hyper::Body→hyper::body::Incominghyper::Client→hyper_util::client::legacy::Clienthyper::Server→hyper_util::server::conn::auto::Builderhyper::body::to_bytes→http_body_util::BodyExt::collect().await?.to_bytes()hyper::rt::Read/Writeare new traits distinct fromtokio::io::AsyncRead/AsyncWrite
libsql-server/Cargo.toml- Updated dependencieslibsql-server/src/lib.rs- Server struct simplificationlibsql-server/src/net.rs- HyperStream wrapper for Hyper 1.0 traitslibsql-server/src/rpc/mod.rs- Tonic 0.12 migration, TLS stream fixeslibsql-server/src/http/admin/mod.rs- Axum 0.7 migrationlibsql-server/src/http/user/mod.rs- Body type conversions, http2_only fixlibsql-server/src/hrana/http/mod.rs- Request body type changeslibsql-server/src/hrana/ws/handshake.rs- WebSocketConfig updateslibsql-server/src/test/bottomless.rs- S3 mock server updates
libsql/src/database.rs- HTTP/2 connector supportlibsql/src/sync.rs- Fixed private_interfaces warninglibsql/src/hrana/hyper.rs- Removed unused imports
bindings/c/Cargo.toml- hyper-rustls 0.25 → 0.27, http 1.1.0 → 1.0bindings/c/src/lib.rs- HTTP/2 connector support
.github/workflows/golang-bindings.yml- Port configuration fix (8080 → 5001)
libsql-ffi/build.rs- Fixed SQLEAN extensions build
- All integration test files migrated to hyper 1.0
- H2C (HTTP/2 Cleartext) upgrade support disabled - uses Hyper 0.14 APIs
- Admin dump from URL disabled - connector trait complexity
- 2 bottomless S3 tests ignored - need full S3 protocol mock
test result: ok. 99 passed; 0 failed; 3 ignored
- Push changes to PR branch (requires workflow scope token)
- Monitor golang-bindings CI result
- Address cargo-udeps false positives if needed
- Final merge preparation
- Original Hyper 0.14 based release