Published Sep 3, 2019

SE-Radio Episode 323: Lin Clark on WebAssembly

Lin Clark delves into the transformative impact of WebAssembly, highlighting security advancements through sandboxing, and enhanced web performance for applications in areas such as gaming and computational tasks, offering a revolutionary alternative to JavaScript.
Episode Highlights
Software Engineering Radio - the podcast for professional software developers logo

Popular Clips

Episode Highlights

  • Overview

    WebAssembly is a groundbreaking technology designed to enhance web application performance by offering a more efficient alternative to JavaScript. explains that while JavaScript was created for ease of use, it wasn't optimized for speed, leading to performance issues in complex applications 1. WebAssembly addresses this by allowing developers to write code in languages like C, C++, or Rust, which compile to WebAssembly, providing more control over execution and memory management 2.

    WebAssembly gives you a language that can do a lot of the same things as JavaScript, but can do so in a more consistently performant way.

    ---

    This approach not only boosts performance but also opens up new possibilities for web development by integrating with existing JavaScript tools 1.

       

    Integration

    Integrating WebAssembly with various programming languages is a key aspect of its functionality. highlights that while C and C++ have mature toolchains for WebAssembly, Rust is rapidly catching up, making it a viable option for developers 3. This integration allows developers to leverage the strengths of multiple languages, particularly for performance-sensitive tasks, by creating modules that can be compiled to WebAssembly and used alongside JavaScript 3.

    You might end up just hiring a Rust developer to do that work for you.

    ---

    This modular approach facilitates collaboration among developers with different expertise, enhancing the development process 4.

       

    Memory

    WebAssembly's memory management is designed to provide security and efficiency. Each WebAssembly module operates within its own memory sandbox, similar to JavaScript, ensuring isolation and security 5. explains that memory is allocated in pages, which can be expanded as needed, offering flexibility in resource management 6.

    Each module gets its own memory. There is some vision in the future that you would be able to share memories between modules.

    ---

    This setup not only protects individual modules from interfering with each other but also lays the groundwork for future enhancements in memory sharing and DOM access 5.

Related Episodes