Skip to content

Commit 0c68b6b

Browse files
committed
feat: Upgrade to Hyper 1.0, Tonic 0.12, and hyper-rustls 0.27
This commit performs a coordinated upgrade of the HTTP stack: Dependencies: - hyper 0.14 → 1.0 - tonic 0.11 → 0.12 - tower-http 0.4 → 0.5 - http 0.2 → 1.0 - hyper-rustls 0.25 → 0.27 (fixes RUSTSEC-2026-0049) - prost 0.12 → 0.13 (tonic 0.12 requirement) New dependencies: - http-body-util: Body collection helpers for hyper 1.0 - hyper-util: Legacy client support (hyper 1.0 removed the old Client) Key API Changes: - Socket trait: Uses hyper::rt::Read/Write instead of AsyncRead/AsyncWrite - HttpSender: Uses hyper_util::client::legacy::Client - Body handling: Uses http_body_util::BodyExt::collect().await.to_bytes() - Hrana: Updated for hyper 1.0 body types - Replication: Uses tonic 0.12 body types (BoxBody) - Sync tests: Updated server implementation for hyper 1.0 Security: - Fixes RUSTSEC-2026-0049 (CRL validation bypass in rustls-webpki via rustls 0.23) Breaking Changes: - None in public API Testing: - All unit tests pass
1 parent e4beaca commit 0c68b6b

14 files changed

Lines changed: 877 additions & 389 deletions

File tree

Cargo.lock

Lines changed: 529 additions & 92 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ rusqlite = { package = "libsql-rusqlite", path = "vendored/rusqlite", version =
4545
"limits",
4646
"hooks",
4747
] }
48-
hyper = { version = "0.14" }
48+
hyper = { version = "1.0" }
4949
tower = { version = "0.4.13" }
5050
zerocopy = { version = "0.7.32", features = ["derive", "alloc"] }
5151

libsql-replication/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ repository.workspace = true
88
description = "Replication protocol for libSQL"
99

1010
[dependencies]
11-
tonic = { version = "0.11", default-features = false, features = ["codegen", "prost"] }
12-
prost = "0.12"
11+
tonic = { version = "0.12", default-features = false, features = ["codegen", "prost"] }
12+
prost = "0.13"
1313
libsql-sys = { workspace = true, default-features = false, features = ["wal", "rusqlite", "api"] }
1414
rusqlite = { workspace = true }
1515
parking_lot = "0.12.1"
@@ -31,8 +31,8 @@ cbc = "0.1.2"
3131
arbitrary = { version = "1.3.0", features = ["derive_arbitrary"] }
3232
bincode = "1.3.3"
3333
tempfile = "3.8.0"
34-
prost-build = "0.12"
35-
tonic-build = "0.11"
34+
prost-build = "0.13"
35+
tonic-build = "0.12"
3636

3737
[features]
3838
encryption = ["libsql-sys/encryption"]

libsql-replication/src/generated/metadata.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// This file is @generated by prost-build.
22
/// Database config used to send db configs over the wire and stored
33
/// in the meta store.
4-
#[allow(clippy::derive_partial_eq_without_eq)]
54
#[derive(Clone, PartialEq, ::prost::Message)]
65
pub struct DatabaseConfig {
76
#[prost(bool, tag = "1")]
@@ -48,10 +47,10 @@ impl DurabilityMode {
4847
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
4948
pub fn as_str_name(&self) -> &'static str {
5049
match self {
51-
DurabilityMode::Relaxed => "RELAXED",
52-
DurabilityMode::Strong => "STRONG",
53-
DurabilityMode::Extra => "EXTRA",
54-
DurabilityMode::Off => "OFF",
50+
Self::Relaxed => "RELAXED",
51+
Self::Strong => "STRONG",
52+
Self::Extra => "EXTRA",
53+
Self::Off => "OFF",
5554
}
5655
}
5756
/// Creates an enum from field names used in the ProtoBuf definition.

0 commit comments

Comments
 (0)