Skip to content

Update rust edition#686

Open
jakecorrenti wants to merge 14 commits into
containers:mainfrom
jakecorrenti:update-rust-edition
Open

Update rust edition#686
jakecorrenti wants to merge 14 commits into
containers:mainfrom
jakecorrenti:update-rust-edition

Conversation

@jakecorrenti
Copy link
Copy Markdown
Member

@jakecorrenti jakecorrenti commented May 18, 2026

Update from the 2021 edition to the 2024 edition.

@jakecorrenti jakecorrenti force-pushed the update-rust-edition branch from dacb47c to 48193c8 Compare May 18, 2026 19:52
@jakecorrenti jakecorrenti changed the title Update rust edition WIP: Update rust edition May 18, 2026
@jakecorrenti jakecorrenti force-pushed the update-rust-edition branch 3 times, most recently from b3c9aca to 25755ce Compare May 21, 2026 19:24
Assisted-by: Claude Code: claude-sonnet-4-6
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Assisted-by: Claude Code: claude-sonnet-4-6
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Assisted-by: Claude Code: claude-sonnet-4-6
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Assisted-by: Claude Code: claude-sonnet-4-6
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
- Add `unsafe` to all 79 extern "C" blocks (78 in bindings.rs, 1 in lib.rs)
- Remove redundant `ref` binding modifier in match arm (2024 edition error)

Assisted-by: Claude Code: claude-sonnet-4-6
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Assisted-by: Claude Code: claude-sonnet-4-6
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Assisted-by: Claude Code: claude-sonnet-4-6
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
The virgl_renderer feature requires system libraries not available during
the initial migration, so these code paths were not reached by cargo fix.

Also fix two collapsible_if clippy warnings in virtio/gpu that only
surface when compiling krun-devices with the gpu feature.

Assisted-by: Claude Code: claude-sonnet-4-6
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
@jakecorrenti jakecorrenti force-pushed the update-rust-edition branch from 25755ce to 244a733 Compare May 21, 2026 19:24
Assisted-by: Claude Code: claude-sonnet-4-6
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Assisted-by: Claude Code: claude-sonnet-4-6
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
- Bump edition from 2021 to 2024 in Cargo.toml
- Wrap #[no_mangle] with #[unsafe(no_mangle)] (84 occurrences)
- Add unsafe {} blocks inside unsafe fn bodies (unsafe-op-in-unsafe-fn)
- Collapse nested if-let blocks flagged by clippy::collapsible_if

Assisted-by: Claude Code: claude-sonnet-4-6
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Add [workspace] to mark it as a standalone crate (not a workspace
member), bump edition to 2024 and rust-version to 1.85.0. No source
changes were required by cargo fix.

Assisted-by: Claude Code: claude-sonnet-4-6
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Assisted-by: Claude Code: claude-sonnet-4-6
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Assisted-by: Claude Code: claude-sonnet-4-6
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
@jakecorrenti jakecorrenti force-pushed the update-rust-edition branch from 244a733 to 99199a1 Compare May 21, 2026 19:29
@jakecorrenti jakecorrenti marked this pull request as ready for review May 21, 2026 20:12
@jakecorrenti jakecorrenti changed the title WIP: Update rust edition Update rust edition May 21, 2026
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