diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 000000000..4d4464d24 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,14 @@ +# Supply-chain cooldown for dependency resolution (unstable min-publish-age, +# tracking issue rust-lang/cargo#17009): crate versions published less than +# 14 days ago are excluded when the resolver runs on a nightly cargo. +# Stable cargo ignores these tables silently, so builds from the committed +# Cargo.lock are unaffected; run `just update` to resolve under the policy. +# When the feature stabilizes, drop the [unstable] table and the nightly +# resolver pin in the justfile: the policy then binds all resolution. +# The fmt nightly (older than the feature) prints an unused-key warning +# for these tables; harmless. +[unstable] +min-publish-age = true + +[registry] +global-min-publish-age = "14 days" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40d23a310..2e2fd7a64 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,10 +24,10 @@ jobs: key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@master + uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # v1 with: toolchain: nightly-2026-01-01 - components: clippy, rustfmt + components: rustfmt - name: Install protoc run: sudo provisioning/protoc.sh @@ -41,7 +41,7 @@ jobs: run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH - name: Check compilation - run: cargo check + run: cargo check --locked - name: Check formatting run: just fmt-check diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b88d13dd2..b73ce4c62 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -207,7 +207,7 @@ jobs: ${{ runner.os }}-cargo-build- - name: Build binary (Darwin) - run: cargo build --release --target ${{ matrix.target }} --bin ${{ matrix.name }} + run: cargo build --locked --release --target ${{ matrix.target }} --bin ${{ matrix.name }} - name: Package binary (Darwin) run: | diff --git a/.github/workflows/security-audit.yml b/.github/workflows/security-audit.yml index c3002038e..4a49fb072 100644 --- a/.github/workflows/security-audit.yml +++ b/.github/workflows/security-audit.yml @@ -22,4 +22,21 @@ jobs: - uses: taiki-e/install-action@43aecc8d72668fbcfe75c31400bc4f890f1c5853 # v2.83.2 with: tool: cargo-audit - - run: cargo audit \ No newline at end of file + - run: cargo audit + # Stable cargo ignores the publish-age policy, so the lockfile can pin + # too-young crates (or deliberately via `just update-allow`); surface them. + - name: Check lockfile against the publish-age cooldown + continue-on-error: true + run: | + rustup toolchain install nightly-2026-06-21 --profile minimal + if ! cargo +nightly-2026-06-21 update --dry-run -Z min-publish-age > cooldown.txt 2>&1; then + msg=$(head -20 cooldown.txt | sed ':a;N;$!ba;s/\n/%0A/g') # %0A = newline in annotations + echo "::warning title=Publish-age cooldown probe failed::$msg" + exit 0 + fi + hits=$(grep -E "Downgrading|is too new" cooldown.txt || true) + if [ -n "$hits" ]; then + count=$(echo "$hits" | wc -l) + msg=$(echo "$hits" | head -20 | sed ':a;N;$!ba;s/\n/%0A/g') + echo "::warning title=Lockfile pins $count crate(s) younger than the publish-age cooldown::$msg" + fi diff --git a/Cargo.lock b/Cargo.lock index 61dac49d7..1ea2b358c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -287,7 +287,7 @@ checksum = "422d110f1c40f1f8d0e5562b0b649c35f345fccb7093d9f02729943dcd1eef71" dependencies = [ "alloy-primitives 1.6.1", "alloy-sol-types", - "http 1.5.0", + "http", "serde", "serde_json", "thiserror 2.0.19", @@ -768,7 +768,7 @@ checksum = "8098f965442a9feb620965ba4b4be5e2b320f4ec5a3fff6bfa9e1ff7ef42bed1" dependencies = [ "alloy-json-rpc", "auto_impl", - "base64 0.22.1", + "base64", "derive_more", "futures", "futures-utils-wasm", @@ -828,7 +828,7 @@ dependencies = [ "alloy-pubsub", "alloy-transport", "futures", - "http 1.5.0", + "http", "rustls", "serde_json", "tokio", @@ -868,9 +868,9 @@ dependencies = [ [[package]] name = "android_system_properties" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" dependencies = [ "libc", ] @@ -917,7 +917,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -928,7 +928,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -1354,8 +1354,8 @@ dependencies = [ "axum-core 0.4.5", "bytes", "futures-util", - "http 1.5.0", - "http-body 1.1.0", + "http", + "http-body", "http-body-util", "itoa", "matchit 0.7.3", @@ -1365,7 +1365,7 @@ dependencies = [ "pin-project-lite", "rustversion", "serde", - "sync_wrapper 1.0.2", + "sync_wrapper", "tower 0.5.3", "tower-layer", "tower-service", @@ -1382,10 +1382,10 @@ dependencies = [ "bytes", "form_urlencoded", "futures-util", - "http 1.5.0", - "http-body 1.1.0", + "http", + "http-body", "http-body-util", - "hyper 1.11.0", + "hyper", "hyper-util", "itoa", "matchit 0.8.4", @@ -1397,7 +1397,7 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sync_wrapper 1.0.2", + "sync_wrapper", "tokio", "tower 0.5.3", "tower-layer", @@ -1414,13 +1414,13 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http 1.5.0", - "http-body 1.1.0", + "http", + "http-body", "http-body-util", "mime", "pin-project-lite", "rustversion", - "sync_wrapper 1.0.2", + "sync_wrapper", "tower-layer", "tower-service", ] @@ -1433,12 +1433,12 @@ checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" dependencies = [ "bytes", "futures-core", - "http 1.5.0", - "http-body 1.1.0", + "http", + "http-body", "http-body-util", "mime", "pin-project-lite", - "sync_wrapper 1.0.2", + "sync_wrapper", "tower-layer", "tower-service", "tracing", @@ -1455,8 +1455,8 @@ dependencies = [ "bytes", "futures-util", "headers", - "http 1.5.0", - "http-body 1.1.0", + "http", + "http-body", "http-body-util", "mime", "pin-project-lite", @@ -1487,9 +1487,9 @@ dependencies = [ "arc-swap", "bytes", "fs-err", - "http 1.5.0", - "http-body 1.1.0", - "hyper 1.11.0", + "http", + "http-body", + "hyper", "hyper-util", "pin-project-lite", "rustls", @@ -1521,12 +1521,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - [[package]] name = "base64" version = "0.22.1" @@ -1599,12 +1593,6 @@ dependencies = [ "hex-conservative 0.2.2", ] -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - [[package]] name = "bitflags" version = "2.13.1" @@ -1877,7 +1865,7 @@ dependencies = [ "alloy", "async-trait", "axum 0.8.9", - "base64 0.22.1", + "base64", "bimap", "bls", "bytes", @@ -1902,7 +1890,7 @@ dependencies = [ "rand 0.9.5", "rayon", "reqwest 0.13.4", - "reqwest-eventsource 0.5.0", + "reqwest-eventsource", "serde", "serde_json", "serde_yaml", @@ -2119,9 +2107,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.6.5" +version = "4.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301b56658598e48f3648647ac6fc887be7e7108eddfa4e9b63fcf3ec58c0cadf" +checksum = "473c7e07f409a8d772161724aa8db6a765a2532a70f9667eeb7b49d3d02fbdca" dependencies = [ "clap_builder", "clap_derive", @@ -2129,9 +2117,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.6.5" +version = "4.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94a65403d1a1bd28f7dc68eb8506e8874808ee5eecb59298de588e2e1407a078" +checksum = "7b48fea5a88e9ae728a2dcbedbfc0e730f7d60da42e1cb049a83c9fb8b789889" dependencies = [ "anstream", "anstyle", @@ -2465,7 +2453,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b" dependencies = [ - "bitflags 2.13.1", + "bitflags", "crossterm_winapi", "document-features", "parking_lot", @@ -3030,7 +3018,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -3049,7 +3037,7 @@ dependencies = [ "mediatype 0.19.20", "pretty_reqwest_error", "reqwest 0.12.28", - "reqwest-eventsource 0.6.0", + "reqwest-eventsource", "sensitive_url", "serde", "serde_json", @@ -3582,35 +3570,16 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap 2.14.0", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "h2" -version = "0.4.15" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cb093c84e8bd9b188d4c4a8cb6579fc016968d14c99882163cd3ff402a4f155" +checksum = "839c0e8a181239723652be9062bb56ca5bf5f64011f73b623f6f4fc59086a228" dependencies = [ "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "http 1.5.0", + "http", "indexmap 2.14.0", "slab", "tokio", @@ -3679,10 +3648,10 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3314d5adb5d94bcdf56771f2e50dbbc80bb4bdf88967526706205ac9eff24eb" dependencies = [ - "base64 0.22.1", + "base64", "bytes", "headers-core", - "http 1.5.0", + "http", "httpdate", "mime", "sha1", @@ -3695,7 +3664,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479bcb872e714e11f72fcc6a71afadbc86d0dbe887bc44252b04cfbc63272897" dependencies = [ "headers-core", - "http 1.5.0", + "http", "mediatype 0.20.0", ] @@ -3705,7 +3674,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" dependencies = [ - "http 1.5.0", + "http", ] [[package]] @@ -3771,17 +3740,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - [[package]] name = "http" version = "1.5.0" @@ -3792,17 +3750,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - [[package]] name = "http-body" version = "1.1.0" @@ -3810,7 +3757,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" dependencies = [ "bytes", - "http 1.5.0", + "http", ] [[package]] @@ -3821,8 +3768,8 @@ checksum = "e9f41fd6a08e4d4ec69df65976da761afd5ad5e58a9d4acb46bd1c953a9e3ff2" dependencies = [ "bytes", "futures-core", - "http 1.5.0", - "http-body 1.1.0", + "http", + "http-body", "pin-project-lite", ] @@ -3847,30 +3794,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "hyper" -version = "0.14.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2 0.3.27", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2 0.5.10", - "tokio", - "tower-service", - "tracing", - "want", -] - [[package]] name = "hyper" version = "1.11.0" @@ -3881,9 +3804,9 @@ dependencies = [ "bytes", "futures-channel", "futures-core", - "h2 0.4.15", - "http 1.5.0", - "http-body 1.1.0", + "h2", + "http", + "http-body", "httparse", "httpdate", "itoa", @@ -3899,8 +3822,8 @@ version = "0.27.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" dependencies = [ - "http 1.5.0", - "hyper 1.11.0", + "http", + "hyper", "hyper-util", "rustls", "tokio", @@ -3915,7 +3838,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ - "hyper 1.11.0", + "hyper", "hyper-util", "pin-project-lite", "tokio", @@ -3930,7 +3853,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.11.0", + "hyper", "hyper-util", "native-tls", "tokio", @@ -3944,19 +3867,19 @@ version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" dependencies = [ - "base64 0.22.1", + "base64", "bytes", "futures-channel", "futures-util", - "http 1.5.0", - "http-body 1.1.0", - "hyper 1.11.0", + "http", + "http-body", + "hyper", "ipnet", "libc", "percent-encoding", "pin-project-lite", - "socket2 0.6.5", - "system-configuration 0.7.0", + "socket2 0.5.10", + "system-configuration", "tokio", "tower-service", "tracing", @@ -4151,7 +4074,7 @@ version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "153be1941a183ec9ccd095ddbe17a8b8d435ef6c76e9e02451b933c3999af2c8" dependencies = [ - "bitflags 2.13.1", + "bitflags", "inotify-sys", "libc", ] @@ -4211,7 +4134,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ "hermit-abi", "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -4329,7 +4252,7 @@ version = "9.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a87cc7a48537badeae96744432de36f4be2b4a34a05a5ef32e9dd8a1c169dde" dependencies = [ - "base64 0.22.1", + "base64", "js-sys", "ring", "serde", @@ -4361,9 +4284,9 @@ dependencies = [ [[package]] name = "keccak" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e24a010dd405bd7ed803e5253182815b41bf2e6a80cc3bfc066658e03a198aa" +checksum = "ffd9697dc4a9a62e2da93389f34400b77a28f0287711263cabb203b3ccb9c0e4" dependencies = [ "cfg-if", "cpufeatures 0.3.0", @@ -4396,9 +4319,9 @@ checksum = "a4933f3f57a8e9d9da04db23fb153356ecaf00cbd14aee46279c33dc80925c37" [[package]] name = "kqueue" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "273c0752728918e0ac4976f2b275b6fefb9ecd400585dec929419f3844cd87b5" +checksum = "8d763e5b24120b4ddf50de6c92308156765aabfbbccebf401da7cff2d70a41ea" dependencies = [ "kqueue-sys", "libc", @@ -4410,7 +4333,7 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07293a4e297ac234359b510362495713f75ea345d5307140414f20c69ffeb087" dependencies = [ - "bitflags 2.13.1", + "bitflags", "libc", ] @@ -4707,7 +4630,7 @@ version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d3d07927151ff8575b7087f245456e549fea62edf0ec4e565a5ee50c8402bc3" dependencies = [ - "bitflags 2.13.1", + "bitflags", "fsevent-sys", "inotify", "kqueue", @@ -4725,7 +4648,7 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42b8cfee0e339a0337359f3c88165702ac6e600dc01c0cc9579a92d62b08477a" dependencies = [ - "bitflags 2.13.1", + "bitflags", ] [[package]] @@ -4734,7 +4657,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -4877,7 +4800,7 @@ version = "0.10.81" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77823a27f0babb03091cb9ed9ef80af3b39dbc82f97e8fa530374b7dafd87a45" dependencies = [ - "bitflags 2.13.1", + "bitflags", "cfg-if", "foreign-types", "libc", @@ -5012,7 +4935,7 @@ version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d30c53c26bc5b31a98cd02d20f25a7c8567146caf63ed593a9d87b2775291be" dependencies = [ - "base64 0.22.1", + "base64", "serde_core", ] @@ -5293,7 +5216,7 @@ checksum = "4b45fcc2344c680f5025fe57779faef368840d0bd1f42f216291f0dc4ace4744" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.13.1", + "bitflags", "num-traits", "rand 0.9.5", "rand_chacha 0.9.0", @@ -5395,7 +5318,7 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls", - "socket2 0.6.5", + "socket2 0.5.10", "thiserror 2.0.19", "tokio", "tracing", @@ -5434,9 +5357,9 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2 0.6.5", + "socket2 0.5.10", "tracing", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -5626,7 +5549,7 @@ version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.13.1", + "bitflags", ] [[package]] @@ -5663,9 +5586,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.16" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcfdb36bda0c880c5931cdc7a2bcdc8ba4556847b9d912bca70bc94708711ad" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" dependencies = [ "aho-corasick", "memchr", @@ -5678,59 +5601,21 @@ version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" -[[package]] -name = "reqwest" -version = "0.11.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" -dependencies = [ - "base64 0.21.7", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2 0.3.27", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.32", - "ipnet", - "js-sys", - "log", - "mime", - "once_cell", - "percent-encoding", - "pin-project-lite", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper 0.1.2", - "system-configuration 0.5.1", - "tokio", - "tokio-util", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-streams 0.4.2", - "web-sys", - "winreg", -] - [[package]] name = "reqwest" version = "0.12.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" dependencies = [ - "base64 0.22.1", + "base64", "bytes", "futures-channel", "futures-core", "futures-util", - "http 1.5.0", - "http-body 1.1.0", + "http", + "http-body", "http-body-util", - "hyper 1.11.0", + "hyper", "hyper-rustls", "hyper-tls", "hyper-util", @@ -5745,7 +5630,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 1.0.2", + "sync_wrapper", "tokio", "tokio-native-tls", "tokio-rustls", @@ -5767,16 +5652,16 @@ version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3" dependencies = [ - "base64 0.22.1", + "base64", "bytes", "encoding_rs", "futures-core", "futures-util", - "h2 0.4.15", - "http 1.5.0", - "http-body 1.1.0", + "h2", + "http", + "http-body", "http-body-util", - "hyper 1.11.0", + "hyper", "hyper-rustls", "hyper-util", "js-sys", @@ -5790,7 +5675,7 @@ dependencies = [ "rustls-platform-verifier", "serde", "serde_json", - "sync_wrapper 1.0.2", + "sync_wrapper", "tokio", "tokio-rustls", "tokio-util", @@ -5804,22 +5689,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "reqwest-eventsource" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f529a5ff327743addc322af460761dff5b50e0c826b9e6ac44c3195c50bb2026" -dependencies = [ - "eventsource-stream", - "futures-core", - "futures-timer", - "mime", - "nom", - "pin-project-lite", - "reqwest 0.11.27", - "thiserror 1.0.69", -] - [[package]] name = "reqwest-eventsource" version = "0.6.0" @@ -5973,11 +5842,11 @@ version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ - "bitflags 2.13.1", + "bitflags", "errno", "libc", "linux-raw-sys", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -6045,7 +5914,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -6226,7 +6095,7 @@ version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" dependencies = [ - "bitflags 2.13.1", + "bitflags", "core-foundation 0.10.1", "core-foundation-sys", "libc", @@ -6384,7 +6253,7 @@ version = "3.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76a5c54c7310e7b8b9577c286d7e399ddd876c3e12b3ed917a8aabc4b96e9e8c" dependencies = [ - "base64 0.22.1", + "base64", "bs58", "chrono", "hex", @@ -6472,7 +6341,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be176f1a57ce4e3d31c1a166222d9768de5954f811601fb7ca06fc8203905ce1" dependencies = [ "digest 0.11.3", - "keccak 0.2.0", + "keccak 0.2.1", ] [[package]] @@ -6575,7 +6444,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -6765,12 +6634,6 @@ dependencies = [ "syn 2.0.119", ] -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - [[package]] name = "sync_wrapper" version = "1.0.2" @@ -6791,36 +6654,15 @@ dependencies = [ "syn 2.0.119", ] -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation 0.9.4", - "system-configuration-sys 0.5.0", -] - [[package]] name = "system-configuration" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" dependencies = [ - "bitflags 2.13.1", + "bitflags", "core-foundation 0.9.4", - "system-configuration-sys 0.6.0", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", + "system-configuration-sys", ] [[package]] @@ -6849,7 +6691,7 @@ dependencies = [ "getrandom 0.4.3", "once_cell", "rustix", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -7189,13 +7031,13 @@ dependencies = [ "async-stream", "async-trait", "axum 0.7.9", - "base64 0.22.1", + "base64", "bytes", - "h2 0.4.15", - "http 1.5.0", - "http-body 1.1.0", + "h2", + "http", + "http-body", "http-body-util", - "hyper 1.11.0", + "hyper", "hyper-timeout", "hyper-util", "percent-encoding", @@ -7255,7 +7097,7 @@ dependencies = [ "futures-core", "futures-util", "pin-project-lite", - "sync_wrapper 1.0.2", + "sync_wrapper", "tokio", "tower-layer", "tower-service", @@ -7268,11 +7110,11 @@ version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" dependencies = [ - "bitflags 2.13.1", + "bitflags", "bytes", "futures-util", - "http 1.5.0", - "http-body 1.1.0", + "http", + "http-body", "pin-project-lite", "tower 0.5.3", "tower-layer", @@ -7486,7 +7328,7 @@ checksum = "8628dcc84e5a09eb3d8423d6cb682965dea9133204e8fb3efee74c2a0c259442" dependencies = [ "bytes", "data-encoding", - "http 1.5.0", + "http", "httparse", "log", "rand 0.9.5", @@ -7932,7 +7774,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -8011,15 +7853,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-sys" version = "0.52.0" @@ -8047,21 +7880,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - [[package]] name = "windows-targets" version = "0.52.6" @@ -8095,12 +7913,6 @@ dependencies = [ "windows_x86_64_msvc 0.53.1", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -8113,12 +7925,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" @@ -8131,12 +7937,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -8161,12 +7961,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" @@ -8179,12 +7973,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" @@ -8197,12 +7985,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" @@ -8215,12 +7997,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -8251,16 +8027,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "wit-bindgen" version = "0.57.1" @@ -8335,18 +8101,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.55" +version = "0.8.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a105cd7b140f6eeec8acff2ea38135d3cab283ada58540f629fe51e46696eb" +checksum = "556764e583adb45a9f8d413c2a147fa7e8d821e48e12b14fd560b607998b75eb" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.55" +version = "0.8.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fe976fb70c78cd64cccfe3a6fc142244e8a77b70959b30faf9d0ac37ee228eb" +checksum = "f2ab42fc20575779bd240faa45f94a74256f755c0fa9e89f0ede20d91d0cdfc1" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 7492148df..3d5b23b14 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -68,7 +68,7 @@ rand = { version = "0.9", features = ["os_rng"] } rayon = "1.10.0" reqwest = { version = "^0.13.2", features = ["json", "stream", "rustls"] } rcgen = "0.13.2" -reqwest-eventsource = "=0.5.0" +reqwest-eventsource = "0.6.0" rustls = "0.23.23" serde = { version = "1.0.202", features = ["derive"] } serde_json = "1.0.117" diff --git a/examples/da_commit/Dockerfile b/examples/da_commit/Dockerfile index 5c5138481..d96325ffd 100644 --- a/examples/da_commit/Dockerfile +++ b/examples/da_commit/Dockerfile @@ -8,12 +8,12 @@ RUN cargo chef prepare --recipe-path recipe.json FROM chef AS builder COPY --from=planner /app/recipe.json recipe.json -RUN cargo chef cook --release --recipe-path recipe.json +RUN cargo chef cook --locked --release --recipe-path recipe.json RUN apt-get update && apt-get install -y protobuf-compiler COPY . . -RUN cargo build --release --bin da_commit +RUN cargo build --locked --release --bin da_commit FROM ubuntu AS runtime diff --git a/examples/status_api/Dockerfile b/examples/status_api/Dockerfile index dd20f0009..bdc29b9bc 100644 --- a/examples/status_api/Dockerfile +++ b/examples/status_api/Dockerfile @@ -8,12 +8,12 @@ RUN cargo chef prepare --recipe-path recipe.json FROM chef AS builder COPY --from=planner /app/recipe.json recipe.json -RUN cargo chef cook --release --recipe-path recipe.json +RUN cargo chef cook --locked --release --recipe-path recipe.json RUN apt-get update && apt-get install -y protobuf-compiler COPY . . -RUN cargo build --release --bin status_api +RUN cargo build --locked --release --bin status_api FROM ubuntu AS runtime diff --git a/justfile b/justfile index 87d33c063..edcfaa124 100644 --- a/justfile +++ b/justfile @@ -1,23 +1,53 @@ -toolchain := "nightly-2026-01-01" +# Used ONLY by fmt/fmt-check: rustfmt.toml relies on nightly-only options. +# check/clippy/test run on stable via rust-toolchain.toml, so lints always +# match the shipped compiler. +fmt_toolchain := "nightly-2026-01-01" + +# Used ONLY to resolve dependency updates: min-publish-age needs a newer +# nightly than the fmt pin above. +resolver_toolchain := "nightly-2026-06-21" + +[doc(""" + Update dependencies under the publish-age cooldown (.cargo/config.toml): + versions published less than 14 days ago are excluded from resolution. + Resolution done on stable (cargo add, plain cargo update) is NOT covered; + this recipe is the intended path for routine updates. Git dependencies + have no publish age and are refreshed WITHOUT any cooldown: review their + lockfile rev changes manually. +""")] +update *args: + rustup toolchain install {{resolver_toolchain}} > /dev/null 2>&1 && cargo +{{resolver_toolchain}} update -Z min-publish-age {{args}} + +[doc(""" + Escape hatch for an urgent update to a version younger than the cooldown, + e.g. `just update-allow h2 0.4.16`. The bypass applies to the WHOLE + resolution of this invocation (transitive picks included), so review the + full Cargo.lock diff, not just the target package. +""")] +update-allow package version: + @echo "NOTE: the cooldown bypass is invocation-global; review the full Cargo.lock diff. + rustup toolchain install {{resolver_toolchain}} > /dev/null 2>&1 && CARGO_RESOLVER_INCOMPATIBLE_PUBLISH_AGE=allow cargo +{{resolver_toolchain}} update -Z min-publish-age -p {{package}} --precise {{version}} fmt: - rustup toolchain install {{toolchain}} > /dev/null 2>&1 && \ - cargo +{{toolchain}} fmt + rustup toolchain install {{fmt_toolchain}} > /dev/null 2>&1 && \ + cargo +{{fmt_toolchain}} fmt fmt-check: - rustup toolchain install {{toolchain}} > /dev/null 2>&1 && \ - cargo +{{toolchain}} fmt --check + rustup toolchain install {{fmt_toolchain}} > /dev/null 2>&1 && \ + cargo +{{fmt_toolchain}} fmt --check clippy: - cargo +{{toolchain}} clippy --all-features --no-deps -- -D warnings + cargo clippy --locked --all-features --no-deps -- -D warnings # Everything needed to run before pushing checklist: - cargo check + cargo check --locked || (echo "Cargo.lock out of date: resolve with 'just update' (publish-age cooldown), not plain cargo update" && exit 1) just fmt just clippy just test cargo audit + @out=$(cargo +{{resolver_toolchain}} update --dry-run -Z min-publish-age 2>&1 | grep -E "Downgrading|is too new" || true); \ + if [ -n "$out" ]; then echo "WARNING: lockfile pins crates younger than the publish-age cooldown:"; echo "$out"; fi # =================================== # === Build Commands for Services === @@ -99,7 +129,7 @@ clean: # Runs the suite of tests for all commit-boost crates. test: - cargo test --all-features + cargo test --locked --all-features # ===================== # === Test Coverage === @@ -112,11 +142,11 @@ test: # If results look wrong after upgrading cargo-llvm-cov, run `just coverage-clean` first. # Requires: cargo install cargo-llvm-cov && rustup component add llvm-tools-preview coverage: - cargo llvm-cov --all-features --html --open + cargo llvm-cov --locked --all-features --html --open # Print a quick coverage summary to the terminal without opening a browser. coverage-summary: - cargo llvm-cov --all-features --summary-only + cargo llvm-cov --locked --all-features --summary-only # Remove all coverage instrumentation artifacts produced by cargo-llvm-cov. coverage-clean: @@ -141,7 +171,7 @@ coverage-clean: - critcmp: baseline diffing tool used by bench-compare """)] bench-install-tools: - cargo install cargo-criterion critcmp + cargo install --locked cargo-criterion critcmp [doc(""" Run microbenchmarks and save results as a named baseline. Example: just bench main @@ -151,14 +181,14 @@ bench-install-tools: For accurate baseline comparisons, use bench-compare instead. """)] bench baseline: - cargo bench --package cb-bench-micro -- --save-baseline {{baseline}} + cargo bench --locked --package cb-bench-micro -- --save-baseline {{baseline}} [doc(""" Run microbenchmarks, save results as "current", then diff against a named baseline. Example: just bench-compare main """)] bench-compare baseline: - cargo bench --package cb-bench-micro -- --save-baseline current + cargo bench --locked --package cb-bench-micro -- --save-baseline current critcmp {{baseline}} current # ================= diff --git a/provisioning/build.Dockerfile b/provisioning/build.Dockerfile index 2efad27a3..56464da06 100644 --- a/provisioning/build.Dockerfile +++ b/provisioning/build.Dockerfile @@ -3,7 +3,7 @@ FROM --platform=${BUILDPLATFORM} rust:1.91-slim-bookworm AS chef ARG TARGETOS TARGETARCH BUILDPLATFORM TARGET_CRATE ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse WORKDIR /app -RUN cargo install cargo-chef --locked && \ +RUN cargo install cargo-chef --version 0.1.78 --locked && \ rm -rf $CARGO_HOME/registry/ FROM --platform=${BUILDPLATFORM} chef AS planner @@ -60,7 +60,7 @@ RUN if [ -f ${BUILD_VAR_SCRIPT} ]; then \ fi && \ apt update && \ apt install -y git make libssl-dev:${TARGETARCH} zlib1g-dev:${TARGETARCH} pkg-config && \ - cargo chef cook ${TARGET_FLAG} --release --recipe-path recipe.json + cargo chef cook --locked ${TARGET_FLAG} --release --recipe-path recipe.json # Get the latest Protoc since the one in the Debian repo is incredibly old COPY provisioning/protoc.sh provisioning/protoc.sh @@ -79,7 +79,7 @@ RUN if [ -f ${BUILD_VAR_SCRIPT} ]; then \ echo "No cross-compilation needed"; \ fi && \ export GIT_HASH=$(git rev-parse HEAD) && \ - cargo build ${TARGET_FLAG} --release --bin ${TARGET_CRATE} && \ + cargo build --locked ${TARGET_FLAG} --release --bin ${TARGET_CRATE} && \ if [ ! -z "$TARGET" ]; then \ # If we're cross-compiling, we need to move the binary out of the target dir mv target/${TARGET}/release/${TARGET_CRATE} target/release/${TARGET_CRATE}; \