From a24a56fea7bcab6fb27dbebbd1d638236228ee34 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Sep 2026 15:32:21 +0000 Subject: [PATCH 1/2] build(deps): bump the tonic-stack group across 1 directory with 3 updates Bumps the tonic-stack group with 3 updates in the / directory: [tonic](https://github.com/hyperium/tonic), [tonic-build](https://github.com/hyperium/tonic) and [prost](https://github.com/tokio-rs/prost). Updates `tonic` from 0.12.3 to 0.14.6 - [Release notes](https://github.com/hyperium/tonic/releases) - [Changelog](https://github.com/grpc/grpc-rust/blob/master/CHANGELOG.md) - [Commits](https://github.com/hyperium/tonic/compare/v0.12.3...tonic-v0.14.6) Updates `tonic-build` from 0.12.3 to 0.14.6 - [Release notes](https://github.com/hyperium/tonic/releases) - [Changelog](https://github.com/grpc/grpc-rust/blob/master/CHANGELOG.md) - [Commits](https://github.com/hyperium/tonic/compare/v0.12.3...tonic-build-v0.14.6) Updates `prost` from 0.13.5 to 0.14.4 - [Release notes](https://github.com/tokio-rs/prost/releases) - [Changelog](https://github.com/tokio-rs/prost/blob/master/CHANGELOG.md) - [Commits](https://github.com/tokio-rs/prost/compare/v0.13.5...v0.14.4) --- updated-dependencies: - dependency-name: prost dependency-version: 0.14.4 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: tonic-stack - dependency-name: tonic dependency-version: 0.14.6 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: tonic-stack - dependency-name: tonic-build dependency-version: 0.14.6 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: tonic-stack ... Signed-off-by: dependabot[bot] --- Cargo.lock | 238 ++++++++++++++++++----------------------------------- Cargo.toml | 6 +- 2 files changed, 82 insertions(+), 162 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 437d198..ec56c1c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -162,28 +162,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "async-stream" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - [[package]] name = "async-trait" version = "0.1.92" @@ -223,7 +201,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" dependencies = [ "async-trait", - "axum-core", + "axum-core 0.4.5", "bytes", "futures-util", "http", @@ -232,7 +210,7 @@ dependencies = [ "hyper", "hyper-util", "itoa", - "matchit", + "matchit 0.7.3", "memchr", "mime", "percent-encoding", @@ -244,12 +222,37 @@ dependencies = [ "serde_urlencoded", "sync_wrapper", "tokio", - "tower 0.5.3", + "tower", "tower-layer", "tower-service", "tracing", ] +[[package]] +name = "axum" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b698c5f9a010f6573133b09e0de5408834d0c82f8d7475a89fc1867a71cd90" +dependencies = [ + "axum-core 0.5.6", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "itoa", + "matchit 0.8.4", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "serde_core", + "sync_wrapper", + "tower", + "tower-layer", + "tower-service", +] + [[package]] name = "axum-core" version = "0.4.5" @@ -271,6 +274,24 @@ dependencies = [ "tracing", ] +[[package]] +name = "axum-core" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "http-body-util", + "mime", + "pin-project-lite", + "sync_wrapper", + "tower-layer", + "tower-service", +] + [[package]] name = "base16ct" version = "0.2.0" @@ -1162,12 +1183,6 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d45db016d36b838f563236e9193d0ee6ce38f3f68b6c94e914b4929c96bbb890" -[[package]] -name = "fixedbitset" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" - [[package]] name = "flate2" version = "1.1.10" @@ -1387,19 +1402,13 @@ dependencies = [ "futures-core", "futures-sink", "http", - "indexmap 2.14.0", + "indexmap", "slab", "tokio", "tokio-util", "tracing", ] -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - [[package]] name = "hashbrown" version = "0.15.5" @@ -1619,7 +1628,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2 0.6.5", + "socket2", "tokio", "tower-service", "tracing", @@ -1768,16 +1777,6 @@ dependencies = [ "icu_properties", ] -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - [[package]] name = "indexmap" version = "2.14.0" @@ -2030,6 +2029,12 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" +[[package]] +name = "matchit" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" + [[package]] name = "md-5" version = "0.10.6" @@ -2102,12 +2107,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "multimap" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084" - [[package]] name = "nom" version = "8.0.0" @@ -2439,16 +2438,6 @@ version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" -[[package]] -name = "petgraph" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" -dependencies = [ - "fixedbitset", - "indexmap 2.14.0", -] - [[package]] name = "pgp" version = "0.20.0" @@ -2661,39 +2650,19 @@ dependencies = [ [[package]] name = "prost" -version = "0.13.5" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" +checksum = "528ac67416ff8646872a3c02cad9cc4ee5dc9f9540c9b10771855c95cb2e5ae1" dependencies = [ "bytes", "prost-derive", ] -[[package]] -name = "prost-build" -version = "0.13.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" -dependencies = [ - "heck", - "itertools 0.14.0", - "log", - "multimap", - "once_cell", - "petgraph", - "prettyplease", - "prost", - "prost-types", - "regex", - "syn 2.0.119", - "tempfile", -] - [[package]] name = "prost-derive" -version = "0.13.5" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" +checksum = "b570b25f7617e43d59005d0990ccb79e950a423952cea19671b7a876da390adf" dependencies = [ "anyhow", "itertools 0.14.0", @@ -2702,15 +2671,6 @@ dependencies = [ "syn 2.0.119", ] -[[package]] -name = "prost-types" -version = "0.13.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52c2c1bf36ddb1a1c396b3601a3cec27c2462e45f07c386894ec3ccf5332bd16" -dependencies = [ - "prost", -] - [[package]] name = "quick-xml" version = "0.36.2" @@ -2743,7 +2703,7 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls", - "socket2 0.6.5", + "socket2", "thiserror 2.0.20", "tokio", "tracing", @@ -2781,7 +2741,7 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2 0.6.5", + "socket2", "tracing", "windows-sys 0.61.2", ] @@ -2959,7 +2919,7 @@ dependencies = [ "tokio", "tokio-rustls", "tokio-util", - "tower 0.5.3", + "tower", "tower-http", "tower-service", "url", @@ -3138,15 +3098,6 @@ dependencies = [ "security-framework", ] -[[package]] -name = "rustls-pemfile" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" -dependencies = [ - "rustls-pki-types", -] - [[package]] name = "rustls-pki-types" version = "1.15.1" @@ -3320,7 +3271,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.14.0", + "indexmap", "itoa", "ryu", "serde", @@ -3559,7 +3510,7 @@ name = "silo-server" version = "0.11.0" dependencies = [ "anyhow", - "axum", + "axum 0.7.9", "base64 0.22.1", "chrono", "clap", @@ -3579,7 +3530,7 @@ dependencies = [ "tar", "tokio", "tonic", - "tower 0.5.3", + "tower", "tracing", "tracing-subscriber", "uuid", @@ -3680,16 +3631,6 @@ dependencies = [ "syn 2.0.119", ] -[[package]] -name = "socket2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - [[package]] name = "socket2" version = "0.6.5" @@ -3751,7 +3692,7 @@ dependencies = [ "futures-util", "hashbrown 0.15.5", "hashlink", - "indexmap 2.14.0", + "indexmap", "log", "memchr", "once_cell", @@ -4145,7 +4086,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.6.5", + "socket2", "tokio-macros", "windows-sys 0.61.2", ] @@ -4198,13 +4139,12 @@ dependencies = [ [[package]] name = "tonic" -version = "0.12.3" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" +checksum = "ac2a5518c70fa84342385732db33fb3f44bc4cc748936eb5833d2df34d6445ef" dependencies = [ - "async-stream", "async-trait", - "axum", + "axum 0.8.9", "base64 0.22.1", "bytes", "h2", @@ -4216,53 +4156,30 @@ dependencies = [ "hyper-util", "percent-encoding", "pin-project", - "prost", - "rustls-pemfile", - "socket2 0.5.10", + "socket2", + "sync_wrapper", "tokio", "tokio-rustls", "tokio-stream", - "tower 0.4.13", + "tower", "tower-layer", "tower-service", "tracing", - "webpki-roots 0.26.11", + "webpki-roots 1.0.9", ] [[package]] name = "tonic-build" -version = "0.12.3" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" +checksum = "c68f61875ac5293cf72e6c8cf0158086428c82c37229e98c840878f1706b0322" dependencies = [ "prettyplease", "proc-macro2", - "prost-build", - "prost-types", "quote", "syn 2.0.119", ] -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "indexmap 1.9.3", - "pin-project", - "pin-project-lite", - "rand 0.8.8", - "slab", - "tokio", - "tokio-util", - "tower-layer", - "tower-service", - "tracing", -] - [[package]] name = "tower" version = "0.5.3" @@ -4271,9 +4188,12 @@ checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" dependencies = [ "futures-core", "futures-util", + "indexmap", "pin-project-lite", + "slab", "sync_wrapper", "tokio", + "tokio-util", "tower-layer", "tower-service", "tracing", @@ -4291,7 +4211,7 @@ dependencies = [ "http", "http-body", "pin-project-lite", - "tower 0.5.3", + "tower", "tower-layer", "tower-service", "url", diff --git a/Cargo.toml b/Cargo.toml index ac09421..270801a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,9 +26,9 @@ repository = "https://github.com/BirknerAlex/silo" [workspace.dependencies] tokio = { version = "1", features = ["full"] } -tonic = { version = "0.12", features = ["tls-webpki-roots"] } -tonic-build = "0.12" -prost = "0.13" +tonic = { version = "0.14", features = ["tls-webpki-roots"] } +tonic-build = "0.14" +prost = "0.14" prost-types = "0.13" serde = { version = "1", features = ["derive"] } serde_yaml = "0.9" From c7d932a2d6942d31f59c97f8fd20d5af11d7a7e7 Mon Sep 17 00:00:00 2001 From: Alexander Birkner Date: Wed, 2 Sep 2026 19:04:21 +0200 Subject: [PATCH 2/2] fix(deps): adapt to tonic 0.14/axum 0.8 breaking changes from the tonic-stack bump tonic-build 0.14 moved proto codegen into a new tonic-prost-build crate (tonic_build::configure() no longer exists), and its generated code now calls into a tonic-prost runtime crate for the codec, so both had to be added alongside tonic-build/prost being dropped from silo-proto's build-dependencies. tonic 0.14 also pulls in axum 0.8 for Routes::into_axum_router(), which no longer satisfies axum::Router's From bound against our axum 0.7. Bumping silo-server to axum 0.8 in turn required: - :param/*param route syntax to {param}/{*file} (axum 0.8 renamed the path-parameter syntax). - Option> no longer implements FromRequestParts on its own; axum 0.8 only extends the Option<_> extractor blanket impl to types that implement the new OptionalFromRequestParts trait, and ConnectInfo does not. Extension does, and ConnectInfo's own extractor is defined in terms of Extension internally, so Option>> is the equivalent that still compiles and behaves the same. Verified locally: cargo build/clippy -D warnings/fmt --check/machete all pass, the full cargo test --workspace suite passes against a real Postgres, and ci/e2e.sh passes end-to-end (dnf/apk/npm/pacman/apt, both direct and pull-through, plus real public-mirror pull-through). Co-Authored-By: Claude Sonnet 5 --- Cargo.lock | 179 +++++++++++++++++++++------------ Cargo.toml | 7 +- crates/silo-proto/Cargo.toml | 11 +- crates/silo-proto/build.rs | 2 +- crates/silo-server/src/http.rs | 59 ++++++----- 5 files changed, 163 insertions(+), 95 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ec56c1c..7419799 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -196,13 +196,13 @@ checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" [[package]] name = "axum" -version = "0.7.9" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" +checksum = "31b698c5f9a010f6573133b09e0de5408834d0c82f8d7475a89fc1867a71cd90" dependencies = [ - "async-trait", - "axum-core 0.4.5", + "axum-core", "bytes", + "form_urlencoded", "futures-util", "http", "http-body", @@ -210,13 +210,12 @@ dependencies = [ "hyper", "hyper-util", "itoa", - "matchit 0.7.3", + "matchit", "memchr", "mime", "percent-encoding", "pin-project-lite", - "rustversion", - "serde", + "serde_core", "serde_json", "serde_path_to_error", "serde_urlencoded", @@ -228,52 +227,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "axum" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b698c5f9a010f6573133b09e0de5408834d0c82f8d7475a89fc1867a71cd90" -dependencies = [ - "axum-core 0.5.6", - "bytes", - "futures-util", - "http", - "http-body", - "http-body-util", - "itoa", - "matchit 0.8.4", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "serde_core", - "sync_wrapper", - "tower", - "tower-layer", - "tower-service", -] - -[[package]] -name = "axum-core" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" -dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http", - "http-body", - "http-body-util", - "mime", - "pin-project-lite", - "rustversion", - "sync_wrapper", - "tower-layer", - "tower-service", - "tracing", -] - [[package]] name = "axum-core" version = "0.5.6" @@ -290,6 +243,7 @@ dependencies = [ "sync_wrapper", "tower-layer", "tower-service", + "tracing", ] [[package]] @@ -1183,6 +1137,12 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d45db016d36b838f563236e9193d0ee6ce38f3f68b6c94e914b4929c96bbb890" +[[package]] +name = "fixedbitset" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" + [[package]] name = "flate2" version = "1.1.10" @@ -2023,12 +1983,6 @@ dependencies = [ "regex-automata", ] -[[package]] -name = "matchit" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" - [[package]] name = "matchit" version = "0.8.4" @@ -2107,6 +2061,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "multimap" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084" + [[package]] name = "nom" version = "8.0.0" @@ -2438,6 +2398,17 @@ version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" +[[package]] +name = "petgraph" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" +dependencies = [ + "fixedbitset", + "hashbrown 0.15.5", + "indexmap", +] + [[package]] name = "pgp" version = "0.20.0" @@ -2658,6 +2629,27 @@ dependencies = [ "prost-derive", ] +[[package]] +name = "prost-build" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03da047801ff44bb6a4d407d4860c05fd70bb81714e6b2f3812603d5b145b042" +dependencies = [ + "heck", + "itertools 0.14.0", + "log", + "multimap", + "petgraph", + "prettyplease", + "prost", + "prost-types", + "pulldown-cmark", + "pulldown-cmark-to-cmark", + "regex", + "syn 2.0.119", + "tempfile", +] + [[package]] name = "prost-derive" version = "0.14.4" @@ -2671,6 +2663,35 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "prost-types" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f94967dc7688f3054c7fac87473ffae4cc4c3904800e2d9f5b857246d8963b0a" +dependencies = [ + "prost", +] + +[[package]] +name = "pulldown-cmark" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9f068eba8e7071c5f9511831b44f32c740d5adf574e990f946ddb53db2f314e" +dependencies = [ + "bitflags", + "memchr", + "unicase", +] + +[[package]] +name = "pulldown-cmark-to-cmark" +version = "22.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab1ad36992cead65f02aa399a373a42730922f1525d988172634fdefdecb8a60" +dependencies = [ + "pulldown-cmark", +] + [[package]] name = "quick-xml" version = "0.36.2" @@ -3502,7 +3523,8 @@ version = "0.11.0" dependencies = [ "prost", "tonic", - "tonic-build", + "tonic-prost", + "tonic-prost-build", ] [[package]] @@ -3510,7 +3532,7 @@ name = "silo-server" version = "0.11.0" dependencies = [ "anyhow", - "axum 0.7.9", + "axum", "base64 0.22.1", "chrono", "clap", @@ -4144,7 +4166,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac2a5518c70fa84342385732db33fb3f44bc4cc748936eb5833d2df34d6445ef" dependencies = [ "async-trait", - "axum 0.8.9", + "axum", "base64 0.22.1", "bytes", "h2", @@ -4180,6 +4202,33 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "tonic-prost" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50849f68853be452acf590cde0b146665b8d507b3b8af17261df47e02c209ea0" +dependencies = [ + "bytes", + "prost", + "tonic", +] + +[[package]] +name = "tonic-prost-build" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "654e5643eff75d7f8c99197ce1440ed19a3474eada74c12bbac488b2cafdae27" +dependencies = [ + "prettyplease", + "proc-macro2", + "prost-build", + "prost-types", + "quote", + "syn 2.0.119", + "tempfile", + "tonic-build", +] + [[package]] name = "tower" version = "0.5.3" @@ -4312,6 +4361,12 @@ version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" +[[package]] +name = "unicase" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" + [[package]] name = "unicode-bidi" version = "0.3.18" diff --git a/Cargo.toml b/Cargo.toml index 270801a..c54245b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,9 +27,10 @@ repository = "https://github.com/BirknerAlex/silo" [workspace.dependencies] tokio = { version = "1", features = ["full"] } tonic = { version = "0.14", features = ["tls-webpki-roots"] } -tonic-build = "0.14" +tonic-prost = "0.14" +tonic-prost-build = "0.14" prost = "0.14" -prost-types = "0.13" +prost-types = "0.14" serde = { version = "1", features = ["derive"] } serde_yaml = "0.9" thiserror = "2" @@ -37,7 +38,7 @@ anyhow = "1" tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } object_store = { version = "0.11", features = ["aws"] } -axum = { version = "0.7", features = ["http2"] } +axum = { version = "0.8", features = ["http2"] } clap = { version = "4", features = ["derive", "env"] } tempfile = "3" bytes = "1" diff --git a/crates/silo-proto/Cargo.toml b/crates/silo-proto/Cargo.toml index 5cf1c54..5bd4898 100644 --- a/crates/silo-proto/Cargo.toml +++ b/crates/silo-proto/Cargo.toml @@ -8,13 +8,14 @@ repository.workspace = true [dependencies] tonic.workspace = true prost.workspace = true +tonic-prost.workspace = true [build-dependencies] -tonic-build.workspace = true +tonic-prost-build.workspace = true # cargo-machete reads `use` statements, and neither of these appears in -# any source file: `prost` is referenced by the derives in the code -# tonic-build generates, and `tonic-build` is only ever called from -# build.rs. Removing either breaks the build. +# any source file: `prost` and `tonic-prost` are referenced by the code +# tonic-prost-build generates, and `tonic-prost-build` is only ever +# called from build.rs. Removing any of them breaks the build. [package.metadata.cargo-machete] -ignored = ["prost", "tonic-build"] +ignored = ["prost", "tonic-prost", "tonic-prost-build"] diff --git a/crates/silo-proto/build.rs b/crates/silo-proto/build.rs index 3b1a9ee..63abe0f 100644 --- a/crates/silo-proto/build.rs +++ b/crates/silo-proto/build.rs @@ -1,5 +1,5 @@ fn main() { - tonic_build::configure() + tonic_prost_build::configure() .build_server(true) .build_client(true) .compile_protos( diff --git a/crates/silo-server/src/http.rs b/crates/silo-server/src/http.rs index c4c303a..0b82a23 100644 --- a/crates/silo-server/src/http.rs +++ b/crates/silo-server/src/http.rs @@ -23,7 +23,7 @@ use std::collections::BTreeMap; use std::sync::Arc; use std::time::Instant; -use axum::extract::{ConnectInfo, Path, Request, State}; +use axum::extract::{ConnectInfo, Extension, Path, Request, State}; use axum::http::{header, HeaderMap, StatusCode}; use axum::response::{IntoResponse, Response}; use axum::routing::get; @@ -57,28 +57,37 @@ pub fn router(state: Arc) -> Router { // Unauthenticated on purpose — see `pacman_public_key`. .route("/pacman-signing-key", get(pacman_public_key)) // dnf/yum - .route("/:repo/:channel/repodata/*file", get(get_repodata)) - .route("/:repo/:channel/Packages/*file", get(get_rpm_package)) + .route("/{repo}/{channel}/repodata/{*file}", get(get_repodata)) + .route("/{repo}/{channel}/Packages/{*file}", get(get_rpm_package)) // apk - .route("/:repo/:channel/apk/:arch/*file", get(get_apk_file)) + .route("/{repo}/{channel}/apk/{arch}/{*file}", get(get_apk_file)) // pacman - .route("/:repo/:channel/pacman/:arch/*file", get(get_pacman_file)) - // apt — `:suite` is accepted but unused: apt appends whatever suite + .route( + "/{repo}/{channel}/pacman/{arch}/{*file}", + get(get_pacman_file), + ) + // apt — `{suite}` is accepted but unused: apt appends whatever suite // its `sources.list` entry names, and silo always answers for - // `:channel` regardless of what that string is (see `deb.rs`'s + // `{channel}` regardless of what that string is (see `deb.rs`'s // module doc for why component and suite aren't independent axes // here the way they are in a real Debian archive). - .route("/:repo/:channel/dists/:suite/*file", get(get_deb_release)) - .route("/:repo/:channel/pool/*file", get(get_deb_package)) + .route( + "/{repo}/{channel}/dists/{suite}/{*file}", + get(get_deb_release), + ) + .route("/{repo}/{channel}/pool/{*file}", get(get_deb_package)) // npm — one catch-all because scoped names (`@acme/widget`) put a // slash inside what npm considers a single path segment. `PUT` is // how `npm publish`/`yarn publish` send a new version. - .route("/:repo/:channel/npm/*path", get(get_npm).put(publish_npm)) - // `*path` never matches a zero-length remainder — `/npm` and + .route( + "/{repo}/{channel}/npm/{*path}", + get(get_npm).put(publish_npm), + ) + // `{*path}` never matches a zero-length remainder — `/npm` and // `/npm/` need their own routes, both mapped to the same root // handler. See `get_npm_root`'s doc for why this exists at all. - .route("/:repo/:channel/npm", get(get_npm_root)) - .route("/:repo/:channel/npm/", get(get_npm_root)) + .route("/{repo}/{channel}/npm", get(get_npm_root)) + .route("/{repo}/{channel}/npm/", get(get_npm_root)) .with_state(state) } @@ -760,8 +769,10 @@ async fn audit_download( .await; } -fn remote_addr(connect_info: Option<&ConnectInfo>) -> Option { - connect_info.map(|ConnectInfo(addr)| addr.ip().to_string()) +fn remote_addr( + connect_info: Option<&Extension>>, +) -> Option { + connect_info.map(|Extension(ConnectInfo(addr))| addr.ip().to_string()) } // ---------------------------------------------------------------- dnf/yum @@ -769,7 +780,7 @@ fn remote_addr(connect_info: Option<&ConnectInfo>) -> Opti async fn get_repodata( State(state): State>, Path((repo, channel, file)): Path<(String, String, String)>, - connect_info: Option>, + connect_info: Option>>, headers: HeaderMap, ) -> Response { if let Err(resp) = validate_repo_path(&repo, &channel) { @@ -794,7 +805,7 @@ async fn get_repodata( async fn get_rpm_package( State(state): State>, Path((repo, channel, file)): Path<(String, String, String)>, - connect_info: Option>, + connect_info: Option>>, headers: HeaderMap, ) -> Response { if let Err(resp) = validate_repo_path(&repo, &channel) { @@ -821,7 +832,7 @@ async fn get_rpm_package( async fn get_apk_file( State(state): State>, Path((repo, channel, arch, file)): Path<(String, String, String, String)>, - connect_info: Option>, + connect_info: Option>>, headers: HeaderMap, ) -> Response { if let Err(resp) = validate_repo_path(&repo, &channel) { @@ -889,7 +900,7 @@ async fn apk_key( async fn get_pacman_file( State(state): State>, Path((repo, channel, arch, file)): Path<(String, String, String, String)>, - connect_info: Option>, + connect_info: Option>>, headers: HeaderMap, ) -> Response { if let Err(resp) = validate_repo_path(&repo, &channel) { @@ -989,7 +1000,7 @@ async fn pacman_key( async fn get_deb_release( State(state): State>, Path((repo, channel, _suite, file)): Path<(String, String, String, String)>, - connect_info: Option>, + connect_info: Option>>, headers: HeaderMap, ) -> Response { if let Err(resp) = validate_repo_path(&repo, &channel) { @@ -1011,7 +1022,7 @@ async fn get_deb_release( async fn get_deb_package( State(state): State>, Path((repo, channel, file)): Path<(String, String, String)>, - connect_info: Option>, + connect_info: Option>>, headers: HeaderMap, ) -> Response { if let Err(resp) = validate_repo_path(&repo, &channel) { @@ -1047,7 +1058,7 @@ async fn get_deb_package( async fn get_npm_root( State(state): State>, Path((repo, channel)): Path<(String, String)>, - connect_info: Option>, + connect_info: Option>>, headers: HeaderMap, ) -> Response { if let Err(resp) = validate_repo_path(&repo, &channel) { @@ -1074,7 +1085,7 @@ async fn get_npm_root( async fn get_npm( State(state): State>, Path((repo, channel, path)): Path<(String, String, String)>, - connect_info: Option>, + connect_info: Option>>, headers: HeaderMap, ) -> Response { if let Err(resp) = validate_repo_path(&repo, &channel) { @@ -1225,7 +1236,7 @@ struct NpmAttachment<'a> { async fn publish_npm( State(state): State>, Path((repo, channel, path)): Path<(String, String, String)>, - connect_info: Option>, + connect_info: Option>>, headers: HeaderMap, request: Request, ) -> Response {