😎 WasmEdge 0.8.2 is released. Networking support, Rust SDK, better compatibility and more.

• 4 minutes to read

WasmEdge 0.8.2 is finally released.

  • Better cross-platform compatibility. Run WasmEdge applications on Mac OS X (Intel & M1), Windows 10, as well as IoT devices with ARM 32-bit chips.
  • Networking support. Make network requests and run an HTTP server from your WasmEdge application.
  • New and improved APIs. Embed WasmEdge functions in C, Rust, and Golang applications.
  • Generic binary output for WasmEdge’s AoT compiler. Take advantage of AOT performance enhancements in cloud native platforms.
  • Support for the proxy-wasm spec. WasmEdge brings high-performance API routing to service mesh.

Cross-platform compatibility

With the manylinux1 build, the WasmEdge Runtime, including its AOT compiler and native extensions, runs on old versions of Linux dated back to 2007. WasmEdge also runs on old devices and SoC boards based on the ARM 32-bit CPUs, which are still commonly used in IoT applications.

Besides Linux, WasmEdge supports Mac OS X, including both Intel and M1-based Macs, and Windows. Those devices are widely used by developers and edge applications. Give it a try from your own laptop!

Going forward, the team is working on supporting real-time OSes, such as seL4, in the coming releases of WasmEdge.

Networking support

Cloud native applications often need to make network connections. But yet, networking is not supported in the standard WebAssembly specs. The WASI-socket spec aims to add socket-based networking support into WebAssembly, but it is still being debated in the community.

The WasmEdge team has decided to implement socket support in WasmEdge 0.8.2. The WasmEdge networking socket support is modeled after the current WASI-socket proposal, and provides a Rust crate for developers to write networking-capable WebAssembly applications.

WasmEdge’s networking socket API suppports TcpStream, TcpListener, UdpSocket, and Shutdown. This release includes Rust demo applications for HTTP client and server implementations for WebAssembly.

Note, currently the WasmEdge socket API only works on Linux.

More details, please see the wasmedge_wasi_socket repo.

API enhancements

A key use case of WasmEdge is to embed it in cloud native environments as a serverless function runtime. That requires developers to launch WasmEdge from a host application through an API.

The WasmEdge C API is an interface to access the WasmEdge runtime from host applications. It is also the basis for other language APIs for WasmEdge, such as the WasmEdge Go API. This release added some features to the WasmEdge C API.

  • Added the static library libwasmedge_c.a.
  • Added the ErrCode to C declarations.
  • Added the API about converting WasmEdge_String to C string.
  • Added the API to get data pointer from the WasmEdge_MemoryInstanceContext.

In addition, WasmEdge 0.8.2 also includes two Rust crates, wasmedge-sys and wasmege-rs, for the Rust API. The wasmedge-sys crate is a low level API generated from the WasmEdge C API. The wasmedge-rs is an idiomatic Rust API wrapped around the low level wasmedge-sys to make it safer and more developer-friendly. The full wasmedge-rs crate is still under active development. Feedbacks and contributions are welcome.

For an example, please check out the dapr-wasm repo. It uses the WasmEdge Golang and Rust APIs to implement sidecar applications in a cloud native service mesh.

Generic binary for WasmEdge’s AoT compiler

WasmEdge 0.8.2 added a new AOT compiler flag --generic-binary. This flag is to generate generic binaries and disable CPU specific optimizations.

As a result, the generic binary may lose about 20% in raw performance but achieves much better compatibility across a whole class of CPUs (eg to generate binaries that work across all x86 CPUs).

Example use cases of --generic-binary include running WasmEdge on serverless platforms such as AWS Lambda, Tencent Cloud, Vercel, and Netlify. In order to reduce startup time to milliseconds on those platforms, we configure WasmEdge to AOT compile its application at deployment time. We cannot pre-determine the exact generation and model of the CPU at runtime. The generic binary option balances the performance of AOT with the portability of the WebAssembly application.

Supports proxy-wasm

Proxy-wasm is a specification to embed the WebAssembly runtime in API proxies. It allows WebAssembly functions to programmatically route API traffic in a service mesh network. The proxy-wasm standard is supported by Envoy, Istio Proxy, and MOSN. With WasmEdge 0.8.2, the community has provided a host implementation for proxy-wasm. WasmEdge can now be used as a high performance extension for Envoy and MOSN.

To learn more about the WasmEdge 0.8.2 release, check out our changelog! WasmEdge 0.8.2 is a significant step toward a cloud native WebAssembly ecosystem. Join us in this revolution!

Finally, we want to acknowledge contributions from our community members, including @actly, @alabulei1, @CaptainVincent, @chenyukang, @hydai, @ibmibmibm, @juntao, @kenvifire, @L-jasmine, @MaazKhan711635, @MileyFu, @nhynes, @q82419, @robnanarivo, @yanganto, and @Yonama.

Last but not least, WasmEdge is participating in the CNCF LFX Mentorship program this year (fall 2021). We’d like to thank the 100+ applicants for our projects from around the world. We look forward to contributions from our interns.

ProductWasmEdgeWebAssemblyRustServerlesscloud computingSocketCNCF
A high-performance, extensible, and hardware optimized WebAssembly Virtual Machine for automotive, cloud, AI, and blockchain applications