Skip to content

Move to the 2024 edition - #68

Merged
CanReader merged 2 commits into
masterfrom
chore/edition-2024
Oct 30, 2026
Merged

CanReader merged 2 commits into
masterfrom
chore/edition-2024

Conversation

@CanReader

Copy link
Copy Markdown
Owner
  • move to the 2024 edition
  • reformat for the 2024 style edition

What this changes

edition = "2024" in Cargo.toml. The extern "C" block in src/cuda/ffi.rs becomes unsafe extern "C", which the new edition requires. The second commit is cargo fmt under the 2024 style, 39 files for a net change of about ten lines, kept separate so the first commit stays readable.

Why

2021 was the default when the project started. The 2024 edition has been stable since Rust 1.85 and the MSRV is 1.87, so nothing holds it back, and new code should not be written against an old edition.

How it was verified

  • cargo test passes
  • cargo clippy --all-targets -- -D warnings is clean
  • Ran cuda_parity on a GPU
  • Trained an example in --release
  • No GPU here, CUDA side not runtime tested

cargo fix --edition ran under 2021 first, then the flip. cargo build --all-targets on 2024 is warning free. The migration lint flagged two tail-expression drop-order changes in tests/gradcheck.rs; both involve temporaries around a CPU tensor, where the order does not matter. cuda_parity passed on an RTX 4050, 16 cases. cargo doc with -D warnings is clean.

Checklist

  • Every new or changed backward rule has a gradcheck case
  • Every new kernel has a cuda_parity case
  • tensor/ops and autograd/ops still mirror each other
  • Public items have /// docs

@CanReader
CanReader merged commit e3bdb2c into master Oct 30, 2026
13 checks passed
@CanReader
CanReader deleted the chore/edition-2024 branch October 30, 2026 17:12
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.

1 participant