Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display panic error messages in web UI #27

Open
ivan-aksamentov opened this issue Nov 3, 2023 · 1 comment
Open

Display panic error messages in web UI #27

ivan-aksamentov opened this issue Nov 3, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@ivan-aksamentov
Copy link

ivan-aksamentov commented Nov 3, 2023

Motivation

Currently panics are printed to the dev console. However, the errors are not manifesting in the web UI. It is not a great user experience.

I understand that the goal of the crate is to print to console, however I am looking for ways to pass the panic info from panic hook into my web application. I run a WebAssembly module in a WebWorker. What are my options?

Is there a way to emit a DOM event from the panic handler somehow and use e.g. AddEventListener() to subscribe to it?

What are the options for a WebAssembly module running in a WebWorker? (it does not have window and some of the other functionality compared to the main thread).

I am using React for UI, Recoil for state handling, and Observable for events.

Any thoughts or ideas?

Proposed Solution

I am looking for possible solutions yet.

Alternatives

I am looking for possible alternatives yet.

Additional Context

N/A

@ivan-aksamentov ivan-aksamentov added the enhancement New feature or request label Nov 3, 2023
@ChocolateLoverRaj
Copy link

ChocolateLoverRaj commented Dec 4, 2023

You can use https://github.com/yishn/wasm-react to directly render React nodes with Rust

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants