WasmEdge 0.9.0 is released just in time for the holidays. It is time for you to check out the bells and whistles, and unlock a new skill for 2022!
This release of WasmEdge is focused on performance, stability, and interoperability with cloud native infrastructure. Specifically, WasmEdge now supports
- SIMD and several other WebAssembly feature proposals by default
- an improved and standard compliant C API
- an improved Go API and Reactr integration
- Dapr integration
- a new Universal Wasm Binary file format for AOT compiled high performance apps
- container and Kubernetes ecosystem
SIMD and other WebAssembly proposals
WasmEdge has supported the WebAssembly SIMD (Single instruction, multiple data) proposal since version 0.7.0. From WasmEdge 0.9.0, it has enabled SIMD by default.
For modern devices with multiple CPU cores, the SIMD allows data processing programs to utilize the CPUs fully. SIMD could greatly enhance the performance of data applications.
Besides the SIMD spec, WasmEdge 0.9.0 also added support for a number of WebAssembly proposals currently under consideration by the W3C, including the Import/Export mutable globals proposal, the Non-trapping float-to-int conversions proposal, the Sign-extension operators proposal, and the Multi-value proposal. Those proposed features are turned on by default in WasmEdge.
If you want to disable some of those features, you could use the
Another performance-related change is that we made the runtime statistics metrics collection and reporting optional in WasmEdge 0.9.0. If you do want to see performance statistics of WasmEdge at runtime, you could use the following command line options.
--enable-time-measuringto show the execution time.
--enable-gas-measuringto show the amount of gas used.
--enable-instruction-countto display the number of executed instructions.
--enable-all-statisticsto enable all of the statistics options.
Improved C API
TheC API saw many changes and improvements in WasmEdge 0.9.0. We updated the host functions related APIs, the Wasm type contexts, and instances creation APIs. We renamed the Interpreter API and simplified WASI creation and initialization. We also refactored the C API’s internal implementation extensively to boost performance.
There are new features in the C API. There is a new WasmEdge C API for listing imports and exports from AST module contexts. Developers could get query WASI and AOT compiler related configurations.
For a detailed description of what's changed in the C API, please check out the changelog.
Universal wasm binary
Much of WasmEdge’s raw performance comes from its highly optimized AOT compiler. Developers could use the
wasmedgec XYZ.wasm XYZ.so command or use SDKs to create a Linux native
.so file from the AOT compiler. However, while the
.so file is vastly more performant, it is not portable. Since 0.9.0, the WasmEdge AOT compiler tool wraps the native binary into a custom section in the origin wasm file. It allows the Wasm application to gracefully degrade from AOT compiled to interpreter execution on unsupported OSes or platforms. Developers could use
wasmedgec XYZ.wasm XYZ.wasm to create a universal wasm binary.
With this feature, you could run the wasm file generated by WasmEdge AOT compiler in other wasm runtimes like a regular wasm file. But if you use WasmEdge to run the wasm file, WasmEdge will extract the native binary from the custom section and execute it.
Container and k8s tooling
Cloud-native WebAssembly applications could be managed by container tools, and runs side by side with Linux container applications in a k8s cluster. As one of the most popular OCI runtime projects, crun, adds built-in WasmEdge 0.9.0 support, the cloud-native WebAssembly vision has finally become a reality.
To learn how to leverage container tools such as Kubernetes, Docker, containerd and CRI-O to orchestrate, manage, and run lightweight WebAssembly applications, please refer to Manage WebAssembly Apps Using Container and Kubernetes Tools.
To learn more about WasmEdge 0.9.0, check out our changelog.
Finally, we want to acknowledge contributions from our community members, including @q82419, @ibmibmibm, @hydai, @SAtacker, @juntao, @LFsWang, @yanganto, @apepkuss, @alabulei1, @dm4, @0yi0, @nhynes, @eee4017, @LuiHsu, @avinal, @MileyFu, @O3OI, @vss96, @kenvifire, @ZhangHanDong, @CaptainVincent, @slidoooor, @robnanarivo, @Peter-Chang, @PsiACE, @spider0061, @Jayita10, @actly, @William-Mou, @L-jasmine, @chenyukang, @Yoname, @MaaKhan711635, @tpmccallum.
Join us in the WebAssembly revolution!
👉 Slack Channel: #wasmedge on CNCF slack channel
👉 Mailing list: Send an email to WasmEdge@googlegroups.com
👉 Twitter: @realwasmedge
👉 Be a contributor: checkout our wish list to start contributing!