Skip to content

Conversation

@srussvoll
Copy link

@srussvoll srussvoll commented Mar 14, 2025

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-wasm feature in wgpu which lets it implement Send and Sync on 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 in wgpu. The fix in this PR enables the "atomics" target feature, which disables the fragile Send and Sync bounds. To use these non-Send types in Bevy, they are stored as NonSend resources 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:

@srussvoll
Copy link
Author

Closing this in favor of #35.

@srussvoll srussvoll closed this Apr 9, 2025
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.

2 participants