Skip to content

Switch networking crates and core to Rust 2024 edition#10004

Closed
kskalski wants to merge 4 commits intoanza-xyz:masterfrom
kskalski:ks/ed2024_net
Closed

Switch networking crates and core to Rust 2024 edition#10004
kskalski wants to merge 4 commits intoanza-xyz:masterfrom
kskalski:ks/ed2024_net

Conversation

@kskalski
Copy link
Copy Markdown

@kskalski kskalski commented Jan 14, 2026

Problem

Rust 2024 migration is now possible for monorepo. Most of the code do not have any semantic changes and is only affected by formatting style switch, some exceptions do exist, mostly in order of drops, which should be reviewed, e.g. w.r.t. possible locking behavior change.

The semantic changes (caused by if-let-rescope, tail-expr-drop-order, edition-2024-expr-fragment-specifier) can be detected running cargo fix --edition and in case of this PR they generate a few cases as attached below

cargo +nightly-2025-09-14 fix --edition -p solana-bloom -p solana-core -p solana-gossip -p solana-net-utils -p solana-tls-utils -p solana-turbine -p agave-xdp

yields
networking_expr_fragment.txt
networking_if_let_rescope.txt
networking_tail_expr.txt

Summary of Changes

  • switch crates owned by networking (plus core, which is partially owned by networking) to Rust 2024 edition
  • update formatting per 2024 style
  • fix collapsible if warnings

Note: styling change could also be decoupled from switching edition, ideally format change should be done shortly before next release cut (to minimize conflicts on any potential back-ports)

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 14, 2026

Codecov Report

❌ Patch coverage is 86.61088% with 192 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.6%. Comparing base (729712b) to head (024ee9f).
⚠️ Report is 9 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #10004    +/-   ##
========================================
  Coverage    82.5%    82.6%            
========================================
  Files         844      844            
  Lines      316758   316891   +133     
========================================
+ Hits       261579   261783   +204     
+ Misses      55179    55108    -71     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alexpyattaev
Copy link
Copy Markdown

Is the entire diff auto-generated?

@kskalski
Copy link
Copy Markdown
Author

Is the entire diff auto-generated?

  1. The switch (f3adcb6) is manual, rest is autogenerated
  2. Formatting (65408f4 for just the networking owned and 0c45dfd for the rest of the core)
cargo +nightly-2025-09-14 fmt --all
  1. Fix collapsible_if and reformat (65408f4)
cargo +nightly-2025-09-14 clippy --workspace --all-targets --fix --features dummy-for-ci-check,frozen-abi -- --deny=warnings --deny=clippy::default_trait_access --deny=clippy::arithmetic_side_effects --deny=clippy::manual_let_else --deny=clippy::uninlined-format-args --deny=clippy::used_underscore_binding
cargo +nightly-2025-09-14 fmt --all

@kskalski kskalski marked this pull request as ready for review January 14, 2026 23:11
@kskalski kskalski requested a review from a team as a code owner January 14, 2026 23:11
@alexpyattaev
Copy link
Copy Markdown

Generally lgtm, but I would consider breaking it up a bit if at all possible to reduce probability of conflicts.

@kskalski
Copy link
Copy Markdown
Author

kskalski commented Jan 16, 2026

Ok, removing core seems like a good step - it more than halved the number of affected files and remove most of the semantic changes.
Closing this one in favor of #10067

@kskalski kskalski closed this Jan 16, 2026
@kskalski kskalski deleted the ks/ed2024_net branch February 23, 2026 01:15
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.

3 participants