Wasmer boosts Python support

Paul Krill
3 Min Read

WebAssembly runtime unveils a new experimental async API and dynamic linking capabilities in WASIX, significantly extending compatibility for Python packages and native modules.

Stylized image depicting Python programming.
Image courtesy of eamesBot/Shutterstock

Wasmer 7, the latest iteration of its WebAssembly runtime, has been launched. This update features an experimental asynchronous API, which brings complete async functionality to Python. Furthermore, the platform now supports dynamic linking in WASIX, expanding its compatibility with various Python packages.

Unveiled on January 30, Wasmer 7’s experimental async API provides premium support for asynchronous functions in Python. This allows previously incompatible, robust libraries like SQLAlchemy and other Python packages to operate. Wasmer stated that this async API is presently accessible across the Singlepass, Cranelift, and LLVM backends.

With Wasmer 7, dynamic linking is now supported within WASIX, the platform’s enhanced version of WASI (WebAssembly System Interface). This significantly expands the range of Python packages and native modules that can be utilized, according to Wasmer. Previously, Python functionality in Wasmer was largely restricted to the core interpreter, leaving many native libraries like Numpy or Pydantic unsupported. Wasmer 7 effectively addresses and eliminates this constraint.

Furthermore, Wasmer 7 incorporates an update to the Cranelift compiler, bringing it to its most recent version, and introduces comprehensive support for WebAssembly exceptions via Cranelift’s updated exception-handling APIs. To achieve this, Wasmer’s development team integrated with the standard libunwind library, complementing Cranelift’s native unwinding capabilities. This integration ensures a unified unwinding mechanism across all compilers that leverage WebAssembly exceptions within Wasmer.

Another feature in Wasmer 7 is the display of a compilation progress bar when modules are built for the first time using the robust LLVM compiler. Moreover, for substantial packages like Python or PHP, specific optimizations are now optionally deactivated for exceptionally large functions, leading to considerably quicker compilation. For instance, Python build times have decreased dramatically from approximately 90 seconds to around 10 seconds.

Additionally, Wasmer 7 enhances RISC-V compatibility by incorporating support for Singlepass. While earlier Wasmer versions provided RISC-V support via LLVM and Cranelift, this new release also introduces the LLVM RV32gc target.

Python ProgrammingSoftware EngineeringCode Libraries & Frameworks
Share This Article
Leave a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *