Skip to content

Commit ecb93e5

Browse files
committed
Modernise the dep stack (tonic 0.14, prost 0.14, …) + encoding-size setter
Brings the SurrealDB fork into line with the rest of the SurrealDB workspace and clears seven RUSTSEC advisories that the old upstream pins were forcing the consumer (SurrealDB) to ignore. Also adds `Config::with_grpc_max_encoding_message_size` so consumers can lift the 4 MB request-side cap, mirroring the existing `with_grpc_max_decoding_message_size` setter. Runtime deps: - tonic 0.10 -> 0.14.5 (`tls-native-roots` feature). Clears RUSTSEC-2025-0134 (rustls-pemfile), RUSTSEC-2026-0098 / -0099 / -0104 (rustls-webpki 0.101.x) pinned via the old tonic 0.10 -> rustls 0.21 chain. - prost 0.12 -> 0.14 (must match `tonic-prost 0.14`). - thiserror 1 -> 2. - async-recursion 0.3 -> 1.1, derive-new 0.5 -> 0.7, fail 0.4 -> 0.5, prometheus 0.13 -> 0.14. - rand 0.8 -> 0.9 (`thread_rng()` -> `rand::rng()`, `Rng::gen_range` -> `Rng::random_range`, `Rng::gen` -> `Rng::random`). - lazy_static dropped; two sites migrated to `std::sync::LazyLock`. - `serde_json` dropped from runtime deps (unused outside the removed dev tests). `rust-toolchain.toml`: bumped from 1.84.1 to 1.95.0 to satisfy the edition2024 requirement introduced by tonic 0.14 / tokio 1.x. Proto regeneration (`proto-build/`): - Switched from `tonic-build 0.10` to `tonic-prost-build 0.14`. - Adjusted `compile_protos` call to the new include-path signature (`&[PathBuf]`). - Regenerated every `src/generated/*.rs` with the new codegen output. References to `tonic::codec::ProstCodec` are now `tonic_prost::ProstCodec`. New API: - `Config::grpc_max_encoding_message_size` field + `Config::with_grpc_max_encoding_message_size(size)` builder. - Threaded through `TikvConnect` and `PdRpcClient::connect`, applied via `.max_encoding_message_size(...)` on the TikvClient channel alongside the existing decoding limit. Dev-deps + dead artefacts dropped: - `[dev-dependencies]` reduced to just `fail + tokio` for the remaining failpoint plumbing. The rest (clap 2, env_logger, serial_test 0.5, proptest, proptest-derive, reqwest, rstest, tempfile, serde_json) supported upstream's CLI examples and live- cluster integration tests; they pulled in unmaintained transitive crates (ansi_term -> RUSTSEC-2021-0139, atty -> RUSTSEC-2024-0375, instant -> RUSTSEC-2024-0384). - Deleted `tests/`, `examples/`, `src/proptests/`, and the matching `[[test]]` / `[[example]]` entries in `Cargo.toml`. - Stripped the in-crate `#[cfg(test)]` modules that depended on the dropped dev-deps: proptest-derive `Arbitrary` markers on `Key`, `BoundRange`, `KvPair`; rstest-driven cases in `src/raw/requests.rs`, `src/transaction/lock.rs`, `src/transaction/transaction.rs`; the tempfile-based test in `src/common/security.rs`. The upstream code is recoverable from `tikv/client-rust` git history if needed. Crate metadata: - Version: `0.3.0-surreal.4` -> `0.4.0-surreal.1`. - Repository URL updated to `https://github.com/surrealdb/tikv-client`. Verification: `cargo run -p tikv-client-proto-build` regenerates clean. `cargo check` succeeds (24 inherited upstream warnings, no errors).
1 parent d04bae8 commit ecb93e5

63 files changed

Lines changed: 1681 additions & 5595 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.toml

Lines changed: 25 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
22
name = "surrealdb-tikv-client"
3-
version = "0.3.0-surreal.4"
3+
version = "0.4.0-surreal.1"
44
keywords = ["TiKV", "KV", "distributed-systems"]
55
license = "Apache-2.0"
66
authors = ["The TiKV Project Authors"]
7-
repository = "https://github.com/tikv/client-rust"
8-
description = "The Rust language implementation of TiKV client."
7+
repository = "https://github.com/surrealdb/tikv-client"
8+
description = "The Rust language implementation of TiKV client (SurrealDB fork)."
99
edition = "2021"
1010

1111
[features]
@@ -25,42 +25,34 @@ members = [
2525
]
2626

2727
[dependencies]
28-
async-recursion = "0.3"
28+
async-recursion = "1.1"
2929
async-trait = "0.1"
30-
derive-new = "0.5"
31-
either = "1.6"
32-
fail = "0.4"
33-
futures = { version = "0.3" }
34-
lazy_static = "1"
30+
derive-new = "0.7"
31+
either = "1.15"
32+
fail = "0.5"
33+
futures = "0.3"
3534
log = "0.4"
36-
pin-project = "1"
37-
prometheus = { version = "0.13", default-features = false }
38-
prost = "0.12"
39-
rand = "0.8"
35+
pin-project = "1.1"
36+
prometheus = { version = "0.14", default-features = false }
37+
prost = "0.14"
38+
rand = "0.9"
4039
regex = "1"
4140
semver = "1.0"
4241
serde = "1.0"
4342
serde_derive = "1.0"
44-
serde_json = "1"
4543
take_mut = "0.2.2"
46-
thiserror = "1"
44+
thiserror = "2"
4745
tokio = { version = "1", features = ["sync", "rt-multi-thread", "macros"] }
48-
tonic = { version = "0.10", features = ["tls"] }
46+
tonic = { version = "0.14", features = ["tls-native-roots"] }
47+
tonic-prost = "0.14"
4948

50-
[dev-dependencies]
51-
clap = "2"
52-
env_logger = "0.10"
53-
fail = { version = "0.4", features = ["failpoints"] }
54-
proptest = "1"
55-
proptest-derive = "0.5.1"
56-
reqwest = { version = "0.11", features = ["json", "native-tls-vendored"] }
57-
rstest = "0.18.2"
58-
serde_json = "1"
59-
serial_test = "0.5.0"
60-
tempfile = "3.6"
61-
tokio = { version = "1", features = ["sync", "rt-multi-thread", "macros"] }
62-
63-
[[test]]
64-
name = "failpoint_tests"
65-
path = "tests/failpoint_tests.rs"
66-
required-features = ["fail/failpoints"]
49+
# Upstream `tikv/client-rust` carried a heavier `[dev-dependencies]`
50+
# block (clap 2, env_logger, serial_test 0.5, proptest, proptest-derive,
51+
# reqwest, rstest, tempfile) for its CLI examples and live-cluster
52+
# integration tests. These pulled in unmaintained transitive crates
53+
# (ansi_term -> RUSTSEC-2021-0139, atty -> RUSTSEC-2024-0375,
54+
# instant -> RUSTSEC-2024-0384) and the matching in-crate `#[cfg(test)]`
55+
# modules + the `tests/`, `examples/`, and `src/proptests/` trees were
56+
# dropped from this fork together with the dev-deps. The deleted files
57+
# remain in upstream history; reintroduce them via the
58+
# `tikv/client-rust` repo if you need to run upstream's test suite.

examples/common/mod.rs

Lines changed: 0 additions & 71 deletions
This file was deleted.

examples/pessimistic.rs

Lines changed: 0 additions & 83 deletions
This file was deleted.

examples/raw.rs

Lines changed: 0 additions & 146 deletions
This file was deleted.

0 commit comments

Comments
 (0)