You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many other prototyping tools for UI frameworks have the option to run in the browser to make it easier to share examples or work without setting up a local development environment, even if the target primarily native platforms:
It would be great if it were possible to create a similar web-based playground for Workbench, whether for docs or examples, or just for experimental. There are two ways of achieving this with different complexities:
Using Broadway. This way, an instance of Workbench can run on a server somewhere, and be exposed via the HTML/Canvas GTK renderer. This works well for simple examples, but more advanced usecases (OpenGL, embedding, Webviews, Videos etc.) don't work.
Using Greenfield. This is a full Wayland compositor that runs in your browser, and can already run the Flatpak version of Workbench out of the box. It can either run apps with Wayland clients attaching natively on the browser site (through WebAssembly), or on the server side (with the raw Flatpak version). From my testing, this works extremely well; even the GTK inspector, video playback, webviews, and OpenGL all work. Also runs in Chrome, Firefox and Safari/GNOME Web without problems.
Here is Workbench, rendering a WebKit webview, running in the browser with the second method:
Which was as simple as setting up a new app in Greenfield's example-applications.json:
Ofc, this would require a server (not just a CDN) to actually host the app similarly to how Broadway would require a server. A better way would be to compile Workbench using the Greenfield SDK, which would mean that it could run natively in the browser using Wasm, but I'm fairly certain that this would require some porting work. The Greenfield talk from FOSDEM 2024 contains a lot of interesting info on how this works internally.
The text was updated successfully, but these errors were encountered:
Many other prototyping tools for UI frameworks have the option to run in the browser to make it easier to share examples or work without setting up a local development environment, even if the target primarily native platforms:
It would be great if it were possible to create a similar web-based playground for Workbench, whether for docs or examples, or just for experimental. There are two ways of achieving this with different complexities:
Here is Workbench, rendering a WebKit webview, running in the browser with the second method:
Which was as simple as setting up a new app in Greenfield's
example-applications.json
:Ofc, this would require a server (not just a CDN) to actually host the app similarly to how Broadway would require a server. A better way would be to compile Workbench using the Greenfield SDK, which would mean that it could run natively in the browser using Wasm, but I'm fairly certain that this would require some porting work. The Greenfield talk from FOSDEM 2024 contains a lot of interesting info on how this works internally.
The text was updated successfully, but these errors were encountered: