mirror of
https://github.com/AventurasTeam/Aventuras.git
synced 2026-10-19 09:34:41 +00:00
Move the Rust crate to edition 2024 (#605)
## 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 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## 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. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ec8f40d253
commit
1195d048f9
2 changed files with 3 additions and 2 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue