Commit ecb93e5
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
File tree
- examples
- common
- proto-build
- src
- src
- common
- generated
- kv
- pd
- proptests
- raw
- request
- store
- transaction
- tests
- common
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
35 | 34 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
44 | | - | |
45 | 43 | | |
46 | | - | |
| 44 | + | |
47 | 45 | | |
48 | | - | |
| 46 | + | |
| 47 | + | |
49 | 48 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments