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.
Heya!
First things first, thanks for developing this great library!
I recently started experimenting with integrating iced into an existing wgpu application that targets native as well as the web.
Im well aware that web is not the main focus of development, but since there are some examples that have some setup for running on the web, I updated them to build and run again.
The following (web) examples have been updated:
With getting the
tour
example running again this should fix #1522 .The cause for the
RuntimeError: unreachable
as described in the issue #1522 back then is likely not the same as now, since the example changed in the meantime.Anyways the issue description still fits the current situation "When starting the tours app it crashes on load (only web)".
The reason for the
RuntimeError: unreachable
is the linetracing_subscriber::fmt::init();
which panics when running on the web.I added
console_log
for logging and a panic hook to also log panics in the browser console, similar to the integration example, so next time we encounter aRuntimeError: unreachable
we should get a more descriptive error message.I have also updated the
README
s where necessary.Note: Text is not rendered on the web because no font is loaded, which is ignored here because it is another already known topic.