wgpu_glyph
wgpu_glyph copied to clipboard
Wasm support?
Hello! So I tried out some of the examples following the directions in wgpu-rs's wiki to compile them to wasm, but they all seemed to fail on trying to create a surface from the winit window (or various other reasons; I tried to get them to work by modifying them based on wgpu-rs's examples, but to no avail). Am I doing something wrong, or does this library not support targeting wasm? If the latter, could support for wasm be added?
Thanks!
this library supports wasm, can you show your example code that was failing? And with creating the surface, are you using a browser that has webgpu enabled? If you don't want to use a browser with webgpu, i haven't tested it but you can try my draft pr here: https://github.com/hecrj/wgpu_glyph/pull/62 and change wgpu to add the feature 'webgl', but not at a computer that can test that atm
this library supports wasm, can you show your example code that was failing?
See https://github.com/hecrj/wgpu_glyph/pull/55#issuecomment-795682366; I tried running the code of that PR (following the directions mentioned in wgpu-rs's repository just adapted for this) on both Firefox Nightly and Chrome Canary to no avail. I would test it again but apparently it won't work on Firefox Nightly, and for some reason a new install of Chrome Canary is crashing for me and I'm not too bothered about figuring out why/fixing it.
I could maybe install the dev edition of Safari and try it out there if necessary, assuming Safari has all the required parts of the WebGPU spec implemented to run the example/this library, though.
Hi there, I'm currently trying to use wgpu_glyph with wasm and it seems I'm unable to understand errors I got. Maybe someone here could tell me what is wrong in my code. Here is the code.
I'm testing this out with firefox 87.0 on macos with dom.webgpu.enabled set to true.
I obtain the following error:
Uncaught (in promise) RuntimeError: unreachable executed __wbg_adapter_53 webpack:///../pkg/rust_wgpu_wasm_example_bg.js?:576 real webpack:///../pkg/rust_wgpu_wasm_example_bg.js?:525 8a9647c3616c122ecb52.module.wasm:1919121:1
Any idea ? Let me know if something I wrote in unclear.
Thanks a lot!