Create WebAssembly Components with wasm-tools
In this Shortcut, I am finally going to introduce you to the much-promised WebAssembly Component Model. Sort of. I am going to do so, but, as has been my wont with these pieces, it will be incremental and over time to keep things manageable. There are a slew of details involved in the process, but I’m going to try to isolate them until I need to bring them up.
If you have not yet read the “Understand the Need for WebAssembly Components” Shortcut, that might be a good thing to do first. I revisited several of the ideas that have been covered over a range of Shortcuts and explained why what I am about to introduce is so important to WebAssembly’s adoption.
In the GitHub repository for this Shortcut, you should enter the directory 22-Wasm-Components-Basic
. In it you will find a readme.md
file describing the installation instructions for the tools so you can follow along.
If you look up the definition of software components, you will see that they represent an approach to building systems out of loosely coupled modules. They usually have a well-defined interface upon which other modules will establish dependencies. The idea is that if we hide the internal details and keep the coupling between modules loose, it is possible to swap one module for another with relative ease. As long as the second module provides the same interface, the original dependent module should not care ...
Get Create WebAssembly Components with wasm-tools now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.