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.