About the course
WebAssembly (WASM) is a transformative technology designed as a portable compilation target for programming languages, enabling high-performance applications across a variety of environments. WASM offers compelling benefits, including near-native execution speed, language independence (allowing code written in languages like C++, Rust, Go, C#, etc. to run safely in sandboxed environments), and the ability to reuse existing codebases effectively. This offering is a customisable workshop specifically designed to provide developers with the practical skills needed to leverage WASM for their specific needs, existing tech stack, and project goals. Unlike a fixed syllabus course, this workshop allows you to select the modules most relevant to your team's objectives, chosen programming languages that compile to WASM, and target host environments (such as web browsers or server-side runtimes).
The workshop covers core WebAssembly concepts at a practical level, focusing on understanding what WASM is, its architecture, key features (modules, imports, exports, linear memory), and its compelling use cases across different domains – from enhancing web application performance to enabling new possibilities on the server and at the edge. A central and highly valuable aspect of the customisation involves selecting specific Source Language Track(s). Participants will delve into the practical workflows, toolchains, and language-specific considerations required to compile code from their preferred programming language(s) (e.g., C++, Rust, Go, C#, JavaScript/TypeScript, etc.) to WebAssembly modules. This hands-on component includes setting up the necessary compilers and tools and understanding the basic compilation targets relevant to their language.
Further customisation is available through selecting Host Environment / Runtime Track(s). Participants will learn how to integrate and run WASM modules in their chosen environments – either in web browsers, enabling seamless interaction with JavaScript and leveraging browser APIs, or outside the browser using WASM runtimes and the WebAssembly System Interface (WASI) for server-side, command-line, or edge computing applications. The workshop also includes valuable optional modules on handling Data Interoperability, covering techniques for efficiently passing complex data types between WASM and the host environment, practical aspects such as debugging, understanding performance considerations, and exploring real-world application examples and best practices. The duration of the workshop is flexible, typically ranging from 1 to 3 days depending on the number and combination of modules selected, ensuring a highly relevant, focused, and efficient learning experience tailored precisely to your team's unique requirements and interests in WebAssembly.
Instructor-led online and in-house face-to-face options are available - as part of a wider customised training programme, or as a standalone workshop, on-site at your offices or at one of many flexible meeting spaces in the UK and around the World.
-
- Understand the fundamental concepts of WebAssembly (WASM), its architecture and key features
- Select and utilise the appropriate toolchain and workflow to compile code from their chosen programming language(s) (e.g., C++, Rust, Go, C#, etc.) to WebAssembly modules.
- Understand and apply techniques for integrating and running WASM modules in their chosen host environment(s) (web browser or server-side/WASI runtime).
- Effectively handle data interoperability, including passing complex data types between WASM and the host environment.
- Implement practical WebAssembly solutions for performance-critical tasks or code reuse within their specific tech stack.
- Debug and troubleshoot WASM modules and their integration in the selected environment(s).
- Understand key considerations and best practices for building, integrating, and deploying WebAssembly applications effectively.
-
This customisable WebAssembly (WASM) workshop is designed for software developers interested in leveraging WASM for performance, portability, and code reuse across different environments. It is ideal for developers working with languages that compile to WASM who want to understand how to integrate WASM into their projects for web, server-side, or other applications. This includes, but is not limited to, developers using:
C / C++
Rust
Go
C# (.NET / Blazor WASM)
Java / Kotlin
JavaScript / TypeScript (e.g., using AssemblyScript or integrating WASM modules)
Other languages with WASM compilation targets.
The workshop is tailored based on the specific programming languages, target environments, and areas of interest relevant to the participants' team or project needs. Get in touch to discuss the technology in your stack.
-
Participants should have:
Familiarity with at least one programming language that has a WebAssembly compilation target (e.g., C++, Rust, Go, C#, Java, or JavaScript/TypeScript).
Basic experience using a command-line interface (CLI).
Some familiarity with the target environment(s) the team wishes to focus on (e.g., web browser development for browser integration, server-side concepts for WASI runtimes) is helpful but not strictly required for all modules.
We can customise the training to match your team's experience and needs - with more time and coverage of fundamentals for new developers, for instance.
-
This WASM course is available for private / custom delivery for your team - as an in-house face-to-face workshop at your location of choice, or as online instructor-led training via MS Teams (or your own preferred platform).
Get in touch to find out how we can deliver tailored training which focuses on your project requirements and learning goals.
-
You are invited to select modules from the following categories to build a tailored workshop. The duration will vary based on the selection, typically ranging from 1 to 3 days.
Core WASM Concepts (Recommended)
Introduction to WebAssembly: What is WASM and why is it important? Compelling use cases (web, server, edge). WASM's goals and benefits (performance, portability, security, language independence).
WASM Architecture Overview: High-level look at the WASM virtual machine, stack machine, linear memory, control flow.
WASM Modules and Key Features: Understanding the structure of a .wasm module. Imports and Exports (interacting with the host). Indexes and Start methods. Linear Memory (how WASM manages memory). Debugging Information overview.
WebAssembly Text Format (.wat): Viewing and understanding the text representation of a WASM module. Basic structure of s-expressions.
Hands-on: Exploring a simple WASM module using online tools or command line, viewing its .wat.
Source Language Tracks (Select One or More)
Compiling C/C++ to WASM (using Emscripten): Setting up the Emscripten SDK. Compiling C/C++ code to .wasm and JavaScript "glue" code. Using Emscripten build flags and options. Simple C/C++ examples compiling to WASM.
Hands-on: Compile a basic C/C++ program to WASM and run it.
Compiling Rust to WASM (using wasm-pack & wasm-bindgen): Setting up the Rust toolchain for WASM. Using wasm-pack for compiling and packaging Rust code for the web or Node.js. Introduction to wasm-bindgen for JavaScript/WASM interop. Simple Rust examples compiling to WASM.
Hands-on: Compile a basic Rust program to WASM and integrate it.
Compiling Go to WASM (using TinyGo): Setting up the TinyGo compiler. Compiling Go code to .wasm. Understanding TinyGo's WASM output characteristics. Simple Go examples compiling to WASM.
Hands-on: Compile a basic Go program to WASM and run it.
Compiling C# to WASM (using Blazor WebAssembly): Introduction to Blazor WebAssembly architecture. Setting up a Blazor WASM project. Building C# applications that run in the browser via WASM. Simple C# examples within Blazor.
Hands-on: Create a simple Blazor WASM component.
(... Additional tracks can be developed for other relevant languages like AssemblyScript, Kotlin, etc., based on customer need.)
Host Environment / Runtime Tracks (Select One or More)
WASM in the Browser Integration: Integrating compiled WASM modules (and glue code) into web applications using JavaScript (ES Modules). Using WebAssembly Browser APIs (WebAssembly.instantiate, WebAssembly.instantiateStreaming). Interacting with the Browser DOM and APIs from WASM (via JavaScript). Integrating WASM with web bundlers (Webpack, Rollup, Parcel).
Hands-on: Integrate a compiled WASM module into a web page and interact with it from JavaScript.
WASM on the Server-Side / WASI: Introduction to running WASM outside the browser. Overview of WASM Runtimes (Wasmtime, Wasmer). Introduction to the WebAssembly System Interface (WASI) for accessing system resources (filesystem, command line, networking - securely). Compiling source languages for a WASI target. Running WASM modules using a WASI runtime.
Hands-on: Compile a simple program for WASI and run it using a WASM runtime.
Advanced / Practical Topics (Optional, select based on needs)
Data Interoperability: Passing simple types vs. complex data types (strings, arrays, structs, objects) between WASM and the Host environment (JS or WASI). Strategies for data marshalling and memory management across the boundary. Using language-specific interop tools (wasm-bindgen, Emscripten's --bind, custom approaches).
Hands-on: Implement passing complex data between WASM and the Host.
Debugging and Profiling: Debugging WASM modules in the browser developer tools. Debugging WASM in server-side runtimes. Introduction to performance profiling techniques for WASM.
Hands-on: Debug a WASM module.
Real-World Application Examples & Best Practices: Case studies of successful WASM implementations. Designing and structuring projects that incorporate WASM. When and where to use WASM effectively. Performance considerations and tips. Security aspects of WASM.
Introduction to the WebAssembly Component Model: Overview of this upcoming standard for better inter-language interop and modularity (if time permits and relevant).
-
WebAssembly.org: The official website for the WebAssembly standard, specifications, and introductory information.
MDN Web Docs - WebAssembly: Comprehensive documentation on using WASM in the browser environment.
WebAssembly System Interface (WASI) Specification: Documentation for the standard allowing WASM to interact with system resources outside the browser.
Documentation for Popular Compile-to-WASM Toolchains (Examples):
Emscripten (C/C++): https://emscripten.org/docs/
TinyGo (Go): https://tinygo.org/docs/guides/webassembly/
Blazor WebAssembly (.NET/C#): https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor
WASM Runtime Documentation (Examples for server-side/WASI):
Wasmtime: https://docs.wasmtime.dev/
WebAssembly Community Group: Information on ongoing WASM proposals and development, including the Component Model.
Trusted by