Skip to content

Bump wgpu, winit, and other Rust deps to latest - #6

Open
randspace0 wants to merge 2 commits into
masterfrom
deps/bump-wgpu-winit-latest
Open

Bump wgpu, winit, and other Rust deps to latest#6
randspace0 wants to merge 2 commits into
masterfrom
deps/bump-wgpu-winit-latest

Conversation

@randspace0

Copy link
Copy Markdown
Owner

Summary

  • wgpu 0.17.0 -> 30.0.0
  • winit 0.28.6 -> 0.30.13
  • pollster 0.3.0 -> 1.0.1
  • log 0.4 -> 0.4.33
  • android_logger 0.13.3 -> 0.15.1

winit 0.30 replaces the run_return/Event match-loop model with the
ApplicationHandler trait, so lib/src/app.rs is restructured around
resumed/window_event/suspended, with WindowEvent::RedrawRequested
driving the render loop instead of MainEventsCleared.

wgpu 30 brings several breaking API changes handled here: surface
creation is now safe and takes an Arc<Window>, request_device takes
a single descriptor with required_features/required_limits,
Operations::store is now StoreOp instead of bool,
SurfaceTexture::present moved to Queue::present, and a handful of
struct fields were renamed (multiview -> multiview_mask,
push_constant_ranges -> immediate_size, plus new required fields
like SurfaceConfiguration::color_space).

Test plan

  • cargo check passes on the host target (x86_64-unknown-linux-gnu)
  • cargo check --target aarch64-linux-android resolves and compiles
    all Rust code; the only failure is android-activity's native
    C++ build step, which requires the Android NDK (not installed in
    this environment) and is unrelated to the dependency/API changes
  • Full Android build via ./gradlew assembleDebug (needs local NDK
    setup, not verified here) — please confirm on-device before merge

🤖 Generated with Claude Code

https://claude.ai/code/session_01AGMMuyCZW4y3wPdjr8WxnC

randspace0 and others added 2 commits August 20, 2026 21:35
wgpu 0.17->30, winit 0.28->0.30, pollster 0.3->1.0, log 0.4->0.4.33,
android_logger 0.13->0.15.

winit 0.30 replaces the run_return/Event match loop with the
ApplicationHandler trait, so app.rs is restructured around
resumed/window_event/suspended. wgpu 30 changes surface creation
(now Arc<Window>-based and safe), request_device (single descriptor
with required_features/required_limits), render pass Operations.store
(now StoreOp), and several other struct field renames.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AGMMuyCZW4y3wPdjr8WxnC
AGP 8.2.1 -> 8.13.2 (latest version compatible with rust-android-gradle;
AGP 9.x is blocked by an open upstream issue -
mozilla/rust-android-gradle#172/#168 - the plugin still references the
AppExtension type AGP 9's new DSL removes), Kotlin 1.9.0 -> 2.4.10,
Gradle wrapper 8.2 -> 8.14.4, rust-android-gradle 0.9.3 -> 0.9.6,
compileSdk/targetSdk 34 -> 36, JDK target 1.8 -> 17.

Downgraded a few androidx deps that require AGP 9.1+/compileSdk 37
(core-ktx to 1.17.0) or exceed android-activity's documented
GameActivity compatibility (games-activity pinned to 4.4.0). Added
pythonCommand = "python3" since rust-android-gradle's linker wrapper
shells out to a bare `python`, which isn't guaranteed to exist.

Also fixes lib/src/lib.rs: winit 0.30 moved
EventLoopBuilder::with_user_event() to EventLoop::with_user_event()
(missed in the initial wgpu/winit dependency bump).

Verified: builds, installs, and renders correctly on a physical
arm64-v8a device.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AGMMuyCZW4y3wPdjr8WxnC
@randspace0

Copy link
Copy Markdown
Owner Author

Also bumped the Android build tooling in a follow-up commit:

  • AGP 8.2.1 → 8.13.2 (not 9.x — rust-android-gradle doesn't support AGP 9's new DSL yet, open upstream issue mozilla/rust-android-gradle#172)
  • Kotlin 1.9.0 → 2.4.10
  • Gradle wrapper 8.2 → 8.14.4
  • rust-android-gradle 0.9.3 → 0.9.6 (+ pythonCommand = "python3", since the linker wrapper shells out to a bare python)
  • compileSdk/targetSdk 34 → 36, JDK target → 17
  • core-ktx → 1.17.0 (1.19.0 needs AGP 9.1+), games-activity → 4.4.0 (pinned to android-activity's documented compat, not the newer 4.4.2), appcompat → 1.8.0, test deps bumped too

Also caught and fixed a real bug from the initial wgpu/winit bump: lib/src/lib.rs was still calling the old EventLoopBuilder::with_user_event(), which winit 0.30 moved to EventLoop::with_user_event() — this only shows up when actually compiling for Android, so cargo check on the host didn't catch it.

Verified end-to-end: built, installed, and ran on a physical arm64-v8a device — the wgpu triangle renders correctly.

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