Skip to content

chore(rust): trim dependency tree - #426

Merged
srdtrk merged 3 commits into
cosmos:masterfrom
citizen-stig:rust-trim-deps
Nov 19, 2026
Merged

srdtrk merged 3 commits into
cosmos:masterfrom
citizen-stig:rust-trim-deps

Conversation

@citizen-stig

Copy link
Copy Markdown
Contributor
  • std listed serde/std and informalsystems-pbjson/std, which enables both optional deps even when the serde feature is off; use weak ?/ features instead (default tree 41 -> 33 crates, std-only 21 -> 13)
  • drop the direct bytes dep: prost re-exports it and &[u8] already implements Buf
  • hex is only used in tests; move it to dev-dependencies

@greptile-apps

greptile-apps Bot commented Oct 27, 2026

Copy link
Copy Markdown

This PR does not match any of the 1 configured review trigger rule.

@zmanian zmanian left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Verified on top of #425: clippy clean, 43 tests pass, --no-default-features and no-std-check build. Dependency tree reduction confirmed (default 41 -> 33 crates, --no-default-features --features std 21 -> 13). The ?/ weak features are fine for the current MSRV (1.60), and &[u8]: Buf with .len() in place of Bytes/.remaining() is equivalent in ensure_iavl_prefix.

Note this will conflict with #416 in rust/Cargo.toml; #416 should rebase after this lands.

- `std` listed `serde/std` and `informalsystems-pbjson/std`, which enables
  both optional deps even when the `serde` feature is off; use weak `?/`
  features instead (default tree 41 -> 33 crates, std-only 21 -> 13)
- drop the direct `bytes` dep: prost re-exports it and `&[u8]` already
  implements `Buf`
- `hex` is only used in tests; move it to dev-dependencies

Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
@citizen-stig

Copy link
Copy Markdown
Contributor Author

@zmanian Thanks for the review! I've rebased on the latest master, should be no conflicts anymore

@codecov

codecov Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.88%. Comparing base (b39e1d4) to head (af0f617).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #426   +/-   ##
=======================================
  Coverage   67.88%   67.88%           
=======================================
  Files           7        7           
  Lines        2824     2824           
=======================================
  Hits         1917     1917           
  Misses        907      907           
Flag Coverage Δ
rust 67.88% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

srdtrk and others added 2 commits November 19, 2026 12:14
- changelog: the `std` feature no longer enables `serde`, so the
  `Serialize`/`Deserialize` impls need `features = ["serde"]`
- ci: run the test suite with `--features serde`, since the default
  feature set no longer covers the serde roundtrip test

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: srdtrk <srdtrk@hotmail.com>
@srdtrk
srdtrk merged commit 787aaf9 into cosmos:master Nov 19, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants