Skip to content

feat!: support Bevy 0.20 - #66

Merged
not-elm merged 9 commits into
mainfrom
feat/bevy-0.20
Oct 15, 2026
Merged

not-elm merged 9 commits into
mainfrom
feat/bevy-0.20

Conversation

@not-elm

@not-elm not-elm commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

Problem

bevy_cef 0.13 targets Bevy 0.19. Bevy 0.20 (wgpu 30, MSRV 1.97.1) changes several APIs bevy_cef depends on (pointer events, MeshAabb, WGSL → WESL shader modules, wgpu HAL texture import) and also changes behavior silently:

  • Sprite now renders through Mesh2d + MeshMaterial2d<SpriteMeshMaterial>, so every sprite matches the mesh-path With<Mesh2d> filters (double input) and its cached material keeps a stale bind group after the webview image is reallocated.
  • Material2d / MeshMaterial3d preparation has no ordering dependency on GpuImage preparation.
  • MaterialPlugin::build starts loading the fragment shader immediately.

Solution

  • C1 refactor: route mesh webview filters through MeshWebviewFilter: behavior-neutral on 0.19; one alias (Or<(With<Mesh3d>, With<Mesh2d>)>, Without<Sprite>) for all four mesh-path sites.
  • C2 feat!: support Bevy 0.20:
    • bevy / bevy_remote 0.20, wgpu 30, rust-version = "1.97.1".
    • Flat pointer events (PointerPress, …), MeshAabb::get_aabb, wgpu 30 IOSurface import.
    • All shaders are WESL; the sampling helper is the module bevy_cef::webview::util (load_shader_library!). Embedded shaders are registered before their MaterialPlugin is added.
    • Sprite webview materials are touched on image reallocation and on Bevy's material reassignment.
    • Windows/Linux: a render-world anchor orders sprite, standard and WebviewExtendedMaterial<E> material preparation after GpuImage. The CPU paint systems run before AssetEventSystems.
    • macOS: webview_blit is ordered .before(RenderGraphSystems::Render) explicitly.
  • C3 docs: release notes and compatibility table for 0.14.0: version 0.14.0, README / CLAUDE.md / CHANGELOG.
  • build: pin cef to =152.3.0+152.0.6 and install render processes with --locked.
  • docs(website): update the custom material guide for WESL.

CEF stays at 152.3.0+152.0.6.

Spec: docs/superpowers/specs/2026-10-14-bevy-0.20-migration-design.md
Plan: docs/superpowers/plans/2026-10-15-bevy-0.20-migration.md

Test Pattern

Done (macOS):

  • cargo clippy --workspace --all-targets --all-features -- -Dwarnings, cargo fmt --all -- --check
  • cargo test --workspace --no-default-features --tests (76 + 54), cargo test --doc
  • CPU (Windows/Linux) path compiled and tested locally by flipping target_os = "macos" to "ios" in a temporary worktree (clippy clean, tests pass, including the CPU-only update_webview_image and sprite repaint tests)
  • C1 tested on Bevy 0.19
  • simple, custom_material, ui_webview, headless_texture, sprite, resize launched with --features debug: no shader, schedule or panic errors in the logs

Pending (this draft PR is for CI first):

  • CI (windows / ubuntu / macos)
  • macOS hardware pass: all 18 examples, sprite_regression scenario (click/wheel delivered once, R-key resize, late WebviewSource, HDR=1, SHUFFLE_SEED=1..3)
  • Windows hardware pass

notelm added 9 commits October 14, 2026 23:38
Bump bevy / bevy_remote to 0.20 and wgpu to 30, declare MSRV 1.97.1, migrate to flat
pointer events, move every shader to WESL (bevy_cef::webview::util replaces
webview::util), and rebind sprite webview materials now that Bevy renders Sprite
through Mesh2d + SpriteMeshMaterial.
…--locked

A library's Cargo.lock does not apply to dependent applications, so the caret
requirement let them resolve newer 152.x bindings against the 152.0.6 runtime.
cargo install ignores the lockfile without --locked.
@not-elm
not-elm marked this pull request as ready for review October 15, 2026 01:30
@not-elm
not-elm merged commit b0057fa into main Oct 15, 2026
6 checks passed
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