React in Python with Pyodide

From web servers to end-to-end Data pipelines, Python has become a ubiquitous tool for building all sorts of programs and software. With powerful built-in libraries and an incredible number of third-party libraries, the Python ecosystem makes it easy to quickly get your project started. In fact, building user interfaces (UIs) is not an exception: PyQT allows you to create cross-platform desktop applications, whereas libraries like Dash allows you to create full-fledged web applications (including the UI) within a single Python script. ...

January 19, 2022 · 10 min · Xing Han Lu

Pyodide 0.19.0 release

Pyodide 0.19 is a major release focused on improving the build system, updating scientific computing packages, and improving the workflow for loading Python code. Here are a few highlights. For the complete list of changes see the changelog. Removal of function pointer cast emulation Some Python C extensions use function pointer casting, which is an unspecified behavior according to the C specification. However, all common native C compilers generate code that works fine. This is not the case with Emscripten when building for WebAssembly, which will fail on function pointer casts. As a workaround we have been using Emscripten’s -s EMULATE_FUNCTION_POINTER_CASTS flag, which emits code to emulate function pointer casts at runtime. This has significant overhead. ...

January 10, 2022 · 4 min · Hood Chatham and Roman Yurchak, on behalf of the Pyodide team

Function Pointer Cast Handling in Pyodide

In the upcoming release of Pyodide version 0.19, we finally support the Python default recursion limit of 1000. We also attain a speed boost of somewhere between 10 and 20 percent. The code size was reduced by 25% from 12 megabytes to 9.1 megabytes. These gains came from this pull request which changed the way we handle function pointer casts. Here is a plot showing the improvements in recursion depth: Recursion limit and depth to segmentation fault Tested with Chrome version 96 and Firefox version 93 ...

December 21, 2021 · 14 min · Hood Chatham

Pyodide becomes member of the Open Source Collective

We would like to announce that Pyodide is now a member of the Open Source Collective (OSC), which will act as the project’s fiscal host. The Pyodide project compiles Python and the scientific stack to WebAssembly using Emscripten. Pyodide was created in 2018 by Michael Droettboom at Mozilla as part of the Iodide project. Later in 2021 Pyodide became an independent open-source project, and the current announcement completes this transition. Pyodide is now able to receive donations and accept sponsorships though Open Source Collective, which should help long term project sustainability. We have looked at a few non-profit umbrella organizations before making this choice, and we quite like the financial transparency and ease of setup offered by OSC. In addition, since Pyodide use cases are wider than scientific computing, we felt that a non-specialized fiscal host would be best. ...

November 10, 2021 · 1 min · Roman Yurchak and Hood Chatham, on behalf of the Pyodide team