Details
Description
Motivation
Since the initial PySide release, we have been getting some questions regarding WebAssembly support, but not so much as other features, that's why this idea was stalled for a long time.
When Pyodide was out, we got more people asking about support, and with[ the announcement|https://www.youtube.com/watch?v=qKfkCY7cmBQ] of PyScript at PyConUS2022 the demand grew a lot.
During PyConUS 2022, in one of the PyScript open spaces there was some discussion on bringing PySide to WebAssembly with PyScript. The reason of this, was the perfect timing after the Qt for Python team was researching the CPython interpreter built for WebAssembly (pushed by the effort of some /core/ python devs).
Because defining a Widget library is one of the future steps for the PyScript project, we know work is already being made with the Toga framework, after the main developer joined Anaconda, at the same time Jupyter Widgets sounds like a nice fit for PyScript as well.
We know that even those frameworks are really nice and easy to use, they don't cover all the cases Qt has been working on for the last years, and due to Qt popularity and the fact that in 6.4 Qt for WebAssembly is back, it was natural to continue with the efforts to make this possible for Python users.
Scope
PySide is a different beast, because it's not written purely in Python due to the Qt/C++ dependency, that's why it's more complicated to make it work.
Pyodide has shown that it's possible to bring non-pure Python modules to WebAssembly, like numpy and the scientific stack, so it's not an impossible thing to achieve. Besides the 'normal' Pyodide way, there might other approaches to simplify the pacaking of the module, like https://github.com/emscripten-forge/recipes
But then we need to define the two main use cases we expect:
1. Expose the PySide6 module to WebAssembly, so we can have an interactive interpreter on a browser being able to import them, and display applications on the same page.
2. Package PySide6 applications to run as a WebAssembly application on the browser.
Side discussions
Attachments
Gerrit Reviews
For Gerrit Dashboard: PYSIDE-962 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
443467,1 | build_scripts: Don't use Qt from the environment for configure checks | dev | pyside/pyside-setup | Status: NEW | +1 | 0 |
443740,2 | WIP: Add a script to create a setup.py | dev | pyside/pyside-setup | Status: NEW | -2 | 0 |
447784,11 | Move the shiboken-generator source around | dev | pyside/pyside-setup | Status: NEW | 0 | 0 |
447785,15 | WIP: Split off shibokengenerator | dev | pyside/pyside-setup | Status: NEW | -2 | 0 |