I while back my pet project was working on wasm and on pc as well.
I was focusing on the pc and now I've tried to fix the wasm version. The web.rs backend contains a lot of unimplemented functions. (ex a "simple" create_buffer_with_data panic).
What is the status of it ? Is anyone working on it or I have to put wasm away for a while again ?
Thanks.
It's working great, there is a section in README explaining how to use it: https://github.com/gfx-rs/wgpu-rs#run-examples-on-the-web-wasm32-unknown-unknown
There are important caveats though:
Edit: also, check out https://gfx-rs.github.io/2020/04/21/wgpu-web.html
I was not clear and did not mentioned I'm using main. Here as I see
create_buffer_with_data calls buffer_get_mapped_range_mut in backend/web.rs and it is unimplemented.
(introduced in https://github.com/gfx-rs/wgpu-rs/commit/63219a5a850da0145352535372dbc64e47e107d4)
Am I missing something ?
Again, if you are interested in the code that can run on the Web target, you need to use the gecko branch, which is behind master.