From 1195d048f948934cbe60feff2493c2e2e7d05367 Mon Sep 17 00:00:00 2001 From: Tony Frazier <16245649+a-frazier@users.noreply.github.com> Date: Sun, 11 Oct 2026 00:33:22 -0400 Subject: [PATCH] Move the Rust crate to edition 2024 (#605) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Moves the `aventura` crate from Rust edition 2021 to 2024, which is the Rust floor `CLAUDE.md` names for new code. ## Changes - `src-tauri/Cargo.toml`: `edition = "2024"`. - `src-tauri/src/main.rs`: edition 2024 makes `std::env::set_var` unsafe, so the NVIDIA/Wayland `WEBKIT_DISABLE_DMABUF_RENDERER` call (Linux only) is wrapped in an `unsafe` block. It runs first in `main`, before `aventura_lib::run()` starts any thread. No other source changes were needed. ## Verification [CI run](https://github.com/AventurasTeam/Aventuras/actions/runs/38110082406) on this branch passed for all six build jobs: Windows, Linux, macOS (Intel and ARM), Android and iOS. The Linux job compiles the `cfg(target_os = "linux")` block that changed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Mp6GGHh2aY397TuZXyUXKX ## Summary by CodeRabbit * **Chores** * Updated the app’s underlying build configuration. This does not change how the app works for users. * **Compatibility** * The existing Linux NVIDIA/Wayland workaround continues to behave as before; its detection and settings are unchanged. * **User-visible changes** * No new features or changes to the app’s interface or behavior are included in this update. Co-authored-by: Claude Sonnet 5.5 --- src-tauri/Cargo.toml | 2 +- src-tauri/src/main.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index bf9693e8..52968280 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -3,7 +3,7 @@ name = "aventura" version = "0.7.12" description = "AI-powered adventure and creative writing frontend" authors = ["Contributors"] -edition = "2021" +edition = "2024" [lib] name = "aventura_lib" diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index efe7c691..9cccfa12 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -6,7 +6,8 @@ fn main() { // Only applied when an NVIDIA GPU is detected, so AMD/Intel users get full GPU acceleration. #[cfg(target_os = "linux")] if is_nvidia_wayland() { - std::env::set_var("WEBKIT_DISABLE_DMABUF_RENDERER", "1"); + // SAFETY: nothing else has started a thread yet. + unsafe { std::env::set_var("WEBKIT_DISABLE_DMABUF_RENDERER", "1") }; } aventura_lib::run()