-
-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
With PyScript most of wgpu should be runnable in a browser. If we can translate out API to WebGPU calls, people can use WebGPU via Python in a browser, which seems like a pretty big thing!
Since we follow the WebGPU IDL spec quite closely, this should not be that hard, though there are some cases to take into account.
I briefly looked into this. Some hurdles to take are:
- We must provide a wheel that pyscript can load. This must either be a
none-any.whl
or awasm32.whl
. Even though we don't have any wasm in it, havingnone-any.whl
can accidentally be installed on a desktop and we don't want that. - Code must be async, since there is no way to synchronously wait for a
Future
in js, we cannot implement our sync version of the async method. I find this the scariest hurdle. (I hope I'm overlooking something that still allows us to do that.) - We must provide a
jswebgpu
backend. Can partially autogenerate this. I don't expect this to be the hardest part. - We must provide a
jscanvas
gui backend if we want to render stuff.
Sub-goals to achieve:
- Support importing
wgpu
and displaying the version numer. - Perform compute tasks.
- Perform rendering tasks.
- Now it should be possible to just run pygfx examples.
kushalkolar, thewtex and eruvanos
Metadata
Metadata
Assignees
Labels
No labels