Skip to content

WIP: Update rust edition#686

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

WIP: 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.

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>
@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
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>
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 48193c8 to d7857e0 Compare May 19, 2026 14:36
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