How WebAssembly Components Enable Safe and Portable Software Extensions

Disclaimer: This summary has been generated by AI. It is experimental, and feedback is welcomed. Please reach out to info@qconlondon.com with any comments or concerns.

Title: How WebAssembly Components Enable Safe and Portable Software Extensions

Speaker: Alex Radovici

Overview: This presentation discusses the advantages of using WebAssembly (WASM) components for building safe and portable software extensions, addressing the limitations of traditional methods like the C Application Binary Interface (C ABI) and exploring the benefits of WASM for application extensions, particularly in Rust.

  • Introduction to Plugins and Extensions:
    • Plugins are essential for extending applications without exposing original application code.
    • The community should have the flexibility to write extensions in various programming languages.
    • Extensions should operate quickly and in a sandboxed environment to ensure security.
  • Challenges with Rust and Traditional Approaches:
    • Rust’s absence of a standard ABI complicates shared library creation, necessitating full source visibility to the compiler.
    • Using Foreign Function Interface (FFI) with C ABI negates Rust's safety and memory model.
  • WebAssembly’s Role and Benefits:
    • WASM allows safe execution of extensions, avoiding FFI, and enhancing data type richness and memory safety.
    • WASM system interface preview (#2) enables running modules outside the browser, linking components from different languages seamlessly.
    • Using tools such as `wit-bindgen` for generating code boilerplate facilitates creating extensions in languages like Rust, Java, and JavaScript.
  • Case Studies and Practical Examples:
    • Examples include widely used Rust projects like Zed and Zellij that implemented extensions using WASM.
    • The process involves creating an API crate for consistent interface usage and employing `cargo component` to manage the building process.
  • Lessons and Conclusions:
    • Tooling for WASM components is evolving; developers must manage resource efficiency and security considerations.
    • Emphasizes the importance of caching compiled extensions to improve performance while maintaining security practices like SHA-256 verification.

The session concludes with the assertion that WASM components present a future-forward method for building integrations across varying languages with enhanced security and operational flexibility.

This is the end of the AI-generated content.


Application extensions are an essential part of any software ecosystem. While Rust is a great language, its lack of a standard ABI means that the whole source code has to be available to the compiler. This makes writing shared libraries and software extensions in Rust almost impossible, unless they expose items through the Foreign Function Interface (FFI) or, in other words, the C ABI. Using FFI renders Rust's type and memory model useless. This talk will explore the ways in which WebAssembly Components can be used to build software extension in Rust avoiding the FFI and exposing rich data types and provide a safe memory mode. It will provide insights into several ways in which widely used Rust projects, such as Zed and Zellij have implemented extensions.


Speaker

Alex Radovici

Operating Systems & Compilers PhD, Author of "Getting Started with Secure Embedded Systems" and Core Contributor of Tock OS

Alex Radovici, PhD. - specializes in Operating Systems and Compiler and is a core contributor to Tock OS. He has published the first book on Tock OS kernel & application development. He has 20 years of experience in software engineering with a focus on embedded systems and IoT, with products delivered to P3, Intel, Cisco, Telekom, and OMV.

Read more
Find Alex Radovici at:

Date

Tuesday Apr 8 / 02:45PM BST ( 50 minutes )

Location

Mountbatten (6th Fl.)

Topics

WebAssembly Rust plugins

Share

From the same track

Session Startup

Questioning Convention: C# as a Shortcut to Startup Velocity

Tuesday Apr 8 / 10:35AM BST

Are you considering founding a startup? What stack would you use? Would you take a bet on a programming language you've never used professionally before? When building a company from scratch, these aren’t just theoretical questions – they’re make-or-break decisions with real consequences.

Speaker image - Sam Cox

Sam Cox

Co-Founder & CTO @Tracebit, Building Security Canaries at Scale

Session services

Expanding Swift from Apps to Services

Tuesday Apr 8 / 11:45AM BST

The Swift programming language is a popular choice for applications, but many engineers are less familiar with Swift’s capabilities for writing services. This session will explore why Swift is a great fit for services development, from memory safety to interoperability with other languages.

Speaker image - Cory Benfield

Cory Benfield

Senior Software Engineer Doing Swift on Server @Apple

Session WASM

WASM in the Enterprise: Secure, Portable, and Ready for Business

Tuesday Apr 8 / 01:35PM BST

WebAssembly (WASM) is emerging as a powerful tool beyond its browser origins, enabling safer, more flexible, and more efficient execution across a wide range of enterprise applications.In this session, we’ll take a hands-on look at real-world use cases, including:

Speaker image - Andrea Peruffo

Andrea Peruffo

Open Source Addicted Software Developer @RedHat, Passionate About Distributed Systems, Compilers, Infrastructure and Everything In Between

Session

WASM Components are a FaaS' Best Friend

Tuesday Apr 8 / 05:05PM BST

Why would you build your own Function as a Service platform and what does a FaaS architecture look like? Building something that can scale to zero, work with your existing systems, stay secure, and handle different workloads isn’t easy.

Speaker image - Laurent Doguin

Laurent Doguin

Director Developer Relations & Strategy @couchbase, Previously Developer Advocate @Clever Cloud and @Nuxeo

Session

Unconference: Memory Safe Native Languages and WASM

Tuesday Apr 8 / 03:55PM BST