Closed
Conversation
This was referenced Mar 17, 2025
Author
|
Closing this in favor of #35. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for Bevy 0.15, and the currently unreleased Iced 0.14.
The pull request is based on the work done in #33, and fixes the broken WASM support and text rendering as outlined in the first comment on that PR.
As outlined in #33 the reason why WASM did not work was that Bevy enables the
fragile-send-sync-non-atomic-wasmfeature inwgpuwhich lets it implementSendandSyncon things that aren't thread safe on the web, whereas Iced disables these bounds. This means that the generic types used by Iced do not satisfy the required bounds inwgpu. The fix in this PR enables the "atomics" target feature, which disables the fragileSendandSyncbounds. To use these non-Sendtypes in Bevy, they are stored asNonSendresources rather than regular resources when compiled for WASM. This ensures that the systems accessing these resources only run on the main thread.Depends on the following PR to be merged first:
iced_wgpu::Renderermanually finish/recall the staging belt iced-rs/iced#2693