WasmEdge 0.9.1 is released! This release features integrated high-performance networking, JavaScript streaming SSR and Fetch API support, a new bindgen framework, Android and OpenHarmony OS support, expanded Kubernetes support, and improved memory management.
- WebAssembly extensions
- Streaming SSR functions
- Android and OpenHarmony
- Kubernetes
- Bug fixes and performance enhancements
WebAssembly extensions
WasmEdge aims to support all standard and optional standard WebAssembly extension proposals. It also supports non-standard and experimental extensions that are important to cloud-native use cases, such as networking and data passing.
High-performance networking in Rust and JavaScript
Networking socket has been supported natively in WasmEdge since version 0.8.2. However, with synchronous networking sockets, the application can only handle one connection at a time. As a result, the fast CPU is idle most of the time, waiting for data to stream in slowly from the network. In 0.9.1, WasmEdge drastically improved networking performance by supporting non-blocking I/O in both Rust and JavaScript applications. With non-blocking I/O, WasmEdge programs can open multiple connections simultaneously and process data from those connections asynchronously as the data is received. In addition, WasmEdge provides a Rust API and a JavaScript API for non-blocking network I/O.
With non-blocking network I/O in JavaScript, we could now run Streaming SSR functions and use the JavaScript Fetch API in WasmEdge. Streaming SSR and Fetch are often used in edge serverless functions.
WasmEdge-Bindgen
The standard WebAssembly spec only supports a few simple data types out of the box. It does not even support common data types such as string and array. To pass rich data types from host apps to WebAssembly functions, we need bindgen solutions to transform complex types into simple ones. For example, a bindgen solution could transform a string into two integers — a memory pointer and a length.
In the browser world, the emscripten toolchain handles JavaScript calling C-based WebAssembly functions, and the wasm-bindgen toolchain handles JavaScript calling Rust-based WebAssembly functions. Yet neither of them works well with WASI apps in the cloud-native environments.
The WasmEdge team created the wasmedge-bindgen framework to support complex arguments passing in WASI environments. It currently supports Go host apps calling Rust-compiled WebAssembly functions. Please see a tutorial here.
We are working on supporting Rust, C, JavaScript / Node.JS, and Python host apps.
Multi-memories proposal
WasmEdge 0.9.1 supported multi-memories proposal. By enabling multiple memories in a single WebAssembly module, this extension makes WebAssembly execution faster (i.e., faster-copying values), more secure, and better isolated.
If you want to enable the multi-memories extension, please use --enable-multi-memory
in wasmedgec
and wasmedge
tools.
Expanded OSes and devices support
Besides seL4-based embedded and real-time devices, WasmEdge has now been ported to even more edge device platforms. The biggest edge device platform is Android, and WasmEdge 0.9.1 is now fully supported on Android.
- Compile and build WasmEdge for Android. 👉 https://wasmedge.org/book/en/extend/build_for_android.html
- Use Rust + WebAssembly for high-performance AI inference (mobilenet image classification) on Android 👉 https://wasmedge.org/book/en/os/android/cli.html
- Wrap a Webassembly app in an Android NDK shell. It is the same TensorFlow TFLite image classification/inference Wasm app as the second one but wrapped in your app. 👉https://wasmedge.org/book/en/os/android/ndk.html
- Create an Android APK app with an embedded WasmEdge Runtime. WebAssembly functions turn your app into a platform for other devs. 👉 https://wasmedge.org/book/en/os/android/apk.html
WasmEdge and its TensorFlow extensions are now fully supported on ARM64 hardware through both Linux and Android OSes.
Furthermore, work has started to support WasmEdge on the OpenHarmony OS, an emerging mobile phone and IoT device OS.
Last but not least, WasmEdge 0.9.1 supports a Windows package manager for Windows users. You could use the following command line to install WasmEdge on Windows.
winget install wasmedge
Kubernetes
WasmEdge is fully OCI-compliant. That means WasmEdge apps can be stored, managed, and executed by standard container tools. In addition, WasmEdge itself is a secure sandbox container.
In a Kubernetes cluster, containerized WasmEdge applications can be managed and orchestrated side-by-side with Linux containers (e.g., Docker container apps) in the same cluster. With release 0.9.1, WasmEdge is officially supported by edge-optimized Kubernetes frameworks, such as OpenYurt and SuperEdge.
Bug fixes and performance enhancements
Every release of WasmEdge comes with a long list of bug fixes and performance enhancements. The release 0.9.1 is no exception.
- Numerous memory leaks, reported from heavy use in real-world applications, have been identified and fixed.
- Reduced memory usage of the instruction class, which further reduced WasmEdge footprints on edge devices.
- WasmEdge execution can now be interrupted and resumed by external signals. This feature supports better-behaved embedded functions.
- Beautified and colorized the WasmEdge CLI help information.
While WasmEdge 0.9.1 is just a minor release, it is jam-packed with significant features to developers. Check it out!
Finally, we want to acknowledge contributions from our community members, including L-jasmine, yanganto, AvengerMoJo, HangedFish, harytary, KernelErr, juntao, MileyFu, O3OI, Saksham Sharma, Shen-Ta Hsieh(BestSteve), SAtacker, Sonofmagic, srenatus, 0xE282B0, vdice, apepkuss, 0yi0, q82419, chenyukang, st9549898, sakhshm26, dreammyboy, zephoon, megrax, alabulei1, alittlehorse, baiyutang, hydai, javadoors, jaredliw, Vinson-Ben, majinghe, meoww-bot, wangbyby, pasicopan, peterbi, villanel, DarumaDocker, wangyuan249, wby, wolfishLamb, sunnywa.
Join us in the WebAssembly revolution!
👉 Discord: https://discord.gg/5hPQ2H5fcg
👉 Mailing list: Send an email to WasmEdge@googlegroups.com
👉 Twitter: @realwasmedge
👉 Be a contributor: checkout the good-first-issue to start contributing!