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 |
431688,2 | build: Address fixme comment in utils.py | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
431689,4 | build: Improve error message about test-configuring projects with cmake | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
443466,3 | build_scripts: Don't use options from the environment | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
443692,2 | libpyside/libpysideqml: Update list of headers to be installed | 6.4 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
443719,2 | libpyside/libpysideqml: Update list of headers to be installed | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
444193,15 | Add support for excluding classes by a preprocessor condition in the module headers | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
445162,4 | shiboken6: Add all comparison operators to class Include | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
445163,4 | shiboken6: Refactor the include handling for the public/private module headers | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
445330,10 | Add configuration options for some Qt classes | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
445409,3 | shiboken6: Add all comparison operators to class Include | 6.4 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
445411,3 | shiboken6: Refactor the include handling for the public/private module headers | 6.4 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
445966,2 | Build system: Use modern form of finding and linking Qt libraries | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
445997,2 | Build system: Use modern form of finding and linking Qt libraries | 6.4 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
446154,3 | Build system: Fix broken find_package() statement | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
446206,2 | Build system: Fix broken find_package() statement | 6.4 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
447102,1 | shiboken6: Sync version with the Qt version | dev | pyside/pyside-setup | Status: ABANDONED | 0 | 0 |
453140,8 | shiboken: de-virtualize the Python files | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
453422,2 | shiboken: de-virtualize the Python files | 6.4 | pyside/pyside-setup | Status: MERGED | +2 | 0 |