perf(deps): reqwest→ureq drops async stack + cleanup (v3.2.18)#60
Merged
Conversation
…nify (v3.2.18) Five dependency/cleanup changes for the v3.3 cycle, shipped as one patch release (no new CLI command — completions deferred to v3.3): - reqwest → ureq (blocking sync HTTP) across the 4 GitHub/tarball fetch sites (update + vault-sync). ureq carries no async runtime, so this removes the entire async stack (tokio/hyper/h2/tower/tower-http/hyper-rustls/ tokio-rustls/hyper-util) from the release binary -- all pulled in only by reqwest. TLS stays rustls; JSON parsed via existing serde_json. Net: -342 KB (3.34->3.01 MB), -54 crates (178->124), ~12% faster clean build (41.0->36.2s). Runtime of everyday commands unchanged (they make no HTTP calls; the fetch paths are network-bound). - Removed the dead tokio_helper runtime shim (#[allow(dead_code)], zero callers, the only direct tokio user). The daemon (v3.3) re-introduces tokio deliberately for its async RPC server. - serde_yaml (archived/unmaintained) -> serde_yaml_ng via package-rename alias; zero code changes. - Dropped the unused clap `env` feature (no #[arg(env)] in the tree). - Unified the two plugin-update text renderers into render_plugin_update_inner, removing the PluginUpdateTextData trait that existed only to make the static renderer generic over a test double (-~80 LOC; Code-Simplifier finding, PR #57). - Renamed vault_sync::run_silent + register_schedule::run_quiet -> both run_embedded (Consistency reviewer finding, PR #57). 3-round review (correctness/ureq parity · deps+tokio-removal · holistic): cargo fmt + clippy -D warnings clean, 1296 tests pass, live `update --check` verified against real GitHub over rustls. docs/reference updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Five dependency/cleanup changes for the v3.3 cycle, bundled as one patch release (
3.2.17 → 3.2.18). No new CLI command — the plannedcompletionscommand is deliberately deferred to ship with the daemon in v3.3, so the3.3.0slot stays reserved for the daemon.Changes
reqwest→ureq(blocking sync HTTP) across the 4 GitHub/tarball fetch sites (update,vault-sync). ureq has no async runtime, so this removes the entire async stack —tokio·hyper·h2·tower·tower-http·hyper-rustls·tokio-rustls·hyper-util— from the release binary (all were pulled in only by reqwest). TLS stays rustls (ureq default features); JSON is parsed via the existingserde_json(ureq'sjsonfeature left off). ureq'shttp_status_as_errordefault maps 4xx/5xx →Err(StatusCode), replacing the old.status().is_success()checks with equivalent error arms.tokio_helperruntime shim (#[allow(dead_code)], zero callers, the only directtokiouser). It was reserved for "future async commands (v3.1+ serve)" — i.e. the daemon, which is the next milestone (v3.3) and will re-introducetokiodeliberately for its async RPC server.block_onhelper in v3.3 is trivial and git history preserves it).serde_yaml(archived/unmaintained) →serde_yaml_ngvia a package-rename alias — actively-maintained drop-in, zero code changes.clapenvfeature (no#[arg(env)]anywhere).plugin updatetext renderers into onerender_plugin_update_inner<W>, removing thePluginUpdateTextDatatrait that existed only to make the static renderer generic over a test double (−~80 LOC; Code-Simplifier finding on PR feat(cli): 3 UX fixes — compact--help, silent plugin update sub-output,--jsonminified (v3.2.15) #57).vault_sync::run_silent+register_schedule::run_quiet→ bothrun_embedded— same intent (the embedded-from-plugin-update entry point), consistent name (Consistency reviewer finding on PR feat(cli): 3 UX fixes — compact--help, silent plugin update sub-output,--jsonminified (v3.2.15) #57).Measured impact (release binary, opt-level=z + lto=fat + strip)
session initwarm runtimeVerification
cargo fmt --checkclean ·cargo clippy --workspace --all-targets -- -D warningsclean (0 warnings)cargo test --workspace— 1296 passed / 1 ignored / 0 failed (unchanged from baseline; mockito-backedupdate/vault-syncintegration tests exercise the real ureq path incl. 200 + non-2xx → error mapping)onebrain update --checkverified against real GitHub over rustlsdocs/reference/mentioning reqwest/tokio) was fixed in this PRVersion: patch 3.2.17 → 3.2.18 (dependency/cleanup release, no new first-level command).
🤖 Generated with Claude Code