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

Wasm freestanding (i.e. browser) via extern loop #5

Open
mitchellh opened this issue Jan 18, 2023 · 0 comments
Open

Wasm freestanding (i.e. browser) via extern loop #5

mitchellh opened this issue Jan 18, 2023 · 0 comments

Comments

@mitchellh
Copy link
Owner

mitchellh commented Jan 18, 2023

Real goal: I want libxev to "work" in the browser so that applications using the event loop can be ported more easily (I have a real world example personal project I want to make work).

The idea is to support a "WasmExtern" backend that defers the actual event loop to the host environment (i.e. the browser). The host environment will call back into the module environment in order to trigger a "tick" and have callbacks be called.

This will make the consumer API slightly different since we can't just block on loop.run(.until_done). But consumers can check something like if (xev.Loop.is_async) or something and work differently.

@mitchellh mitchellh changed the title browser-compatible wasm backend Wasm freestanding (i.e. browser) via extern loop Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant