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

WebAssembly support? #3

Open
Zentendo opened this issue Oct 26, 2021 · 2 comments
Open

WebAssembly support? #3

Zentendo opened this issue Oct 26, 2021 · 2 comments

Comments

@Zentendo
Copy link

@bvssvni @shinmili Does this backend run with WebAssembly? Particularly with the wgpu 0.11 WebGL 2 backend support: gfx-rs/wgpu@312828f

@shinmili
Copy link
Collaborator

I expect this backend should be able to used on wasm (even with wgpu 0.10, using WebGPU backend), but haven't tried it because of my lacking of wasm experiences.

Particularly about WebGL 2 backend, there is no support because this crate depends on wgpu 0.10 for now. Updating to 0.11 will only affect examples codes and won't be really hard.

@shinmili
Copy link
Collaborator

shinmili commented Nov 1, 2021

Okay, basically it supports WebAssembly! Here is a sample you can try and run.

The sample project depends on a patched version of this crate including the following changes:

  • Update wgpu to 0.11 (because I can't figure out how to enable WebGPU on my browsers)
  • Remove Wgpu2d's lifetime parameter (because winit event loop requires captured objects to be 'static)

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

No branches or pull requests

2 participants