bevyengine / bevyengine/bevy

Use EventLoopExtWebSys::spawn in bevy_winit

Open
#6,667 1 comment 1 reaction 0 assignees View on GitHub
A-Windowing C-Feature O-Web
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

See https://github.com/rust-windowing/winit/issues/1714 for the relevant discussion, but the TLDR is that `EventLoopExtWebSys::spawn` provides a work around for the hack of using an exception to get the event loop working on the web platform.

https://github.com/rust-windowing/winit/pull/2208 is included in winit 0.27.0 which is included in Bevy 0.9, however, bevy_winit is current not using this feature.

Other related issues: https://github.com/rust-windowing/winit/issues/900 https://github.com/rust-windowing/winit/issues/1199

Contributor guide

Open the contributing guide

Research direction

Start with the bevy_winit event-loop integration and compare it with winit 0.27.0's EventLoopExtWebSys::spawn. Read the linked winit discussion and pull request for the intended web-platform behavior; done means bevy_winit uses the supported approach instead of the exception-based workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.