This wiki contains may links to WebAssembly related resources that were encountered over time. And the wiki is updated as new resources are found. It is NOT meant to give an exhaustive overview of the field and its current status, but just serves to inspire on some of the ways that Wasm is used in-the-wild.
- WebAssembly 1.0 is supported in all major browsers.
- WebAssembly Core 2.0 is undergoing a W3C recommendation process.
- WebAssembly System Interface is a modular set of specs that bring WASM to the server.
- WebAssembly Component Model provides building blocks that WASI is built on top of.
- Bytecode Alliance promotes adoption, has production-ready implementations (in Rust).
- Cloud Native Computing Foundation (part of Linux Foundation) tracks, creates WASM projects.
- Clound Native Computing Foundation: WASM Developer Survey (Oct 24, 2022)
- Developer Tooling for Cloud-Native Wasm Is Going Mainstream (Nov 04, 2022)
- Evolution of Wasm Standards: Building the Component Model for Wasm (Mar 8, 2023)
- The Four Domains of WASM (Mar 14, 2023)
- The Road Ahead: Insights from Wasm I/O on the Future of Web Assembly (Apr 19, 2023)
- WebAssembly: a new development paradigm for the web @ Google I/O (May 10, 2023)
- Bytecode Alliance: WebAssembly Updated Roadmap for Developers (July 24, 2023)
- The State of WeAssembly Survey 2023 (Oct 18, 2023)
- WIT Cheat Sheet by Cosmonic (Oct 10, 2023)
The introduction of WASM to the server, the cloud, and the edge is more far-reaching than initially apparent. It opens a completely new paradigm to Component-based architecture.
- Fine-grained plugin model. Modularity. Nano processes. Polyglot.
- New software delivery model. Beyond containers.
- Security-first design. Trustless computing. Capability-based security.
- Performant, size/memory efficient, suitable from micro scale and upwards.
- Focus on Developer Experience, ease of use. Minimize stack/infra maintenance.
- Interoperability, portability. Based on open standards (e.g. Component Model).
Terminology popularized by use cases & projects based on this approach (need not be WASM-related):
- FaaS (Function as a Service)
- E.g. WasmEdge (“functions anywhere”).
- Universal FFI (Foreign Function Interface)
In a recent publications (Google Doc turned PDF below), Ian “Hixie” Hickson, editor of the HTML specification for 10 years, in January 2023 criticises the use of hypermedia for intricate web applications, and proposes an alternate approach based on Wasm (defending it on Hacker News), among others:
By providing low-level primitives instead, applications could ship with their own implementations of high-level concepts like layout, widgets, and gestures, enabling a much richer set of interactions and custom experiences with much less effort on the part of the developer.
As it happens, among the many high-level primitives, a few low-level APIs have been created and are available on the web today:
- ARIA (Accessible Rich Internet Applications) provides an ontology for enabling accessibility of arbitrary content.
This document proposes to enable browsers to render web pages that are served not as HTML files, but as Wasm files, skipping the need for HTML, JS, and CSS parsing in the rendering of the page, by having the WebGPU, ARIA, and WebHID APIs exposed directly to Wasm.
(Tooted on the Fediverse in this post)
“WebAssembly Everywhere” represents a paradigm shift which allows fine-grained composition of services, that aligns perfectly to the idea of App-Free Computing. Control of the supply line, dependency management, new ways of packaging and deployment of solutions and a primary focus on Developer/DevOps Experience to bring productivity gains, represents a powerful value proposition.
There’s a lot of attention for compliance and open standards, probably driven by the urgent Need and focus on Supply Chain control. An area where Free Software is firmly in the rear guard, which represents a big threat. Prosperity Guilds is exploring the service Software Supply Chain where Solidground can add value.
Wrt packaging and deployment, the IT practices have gone crazy complex in recent years. The paradigm shift intends to address this low-hanging fruit of productivity gains. WebAssembly allows more fine-grained deployment (terminology found: ‘micro-microservices’, ‘nanoservices’). Docker is recognizing this:
Regarding software delivery model consider this diagram:
In the diagram, where Cosmonic position themself is where the general WASM-based delivery model is (but without the Actor Model, which is added value offered by wasmCloud and Cosmonic).
Related to Supply Chain above, but also Groundwork plugins and App-Free Computing needs…
wargis an in-development open source registry protocol for Wasm packages (components or ‘world’ interfaces).
wargprovides an index allowing everyone to refer to federated namespaces of Wasm packages without being opinionated about how package content is stored and hosted. Warg is:
- Component Model oriented.
- Federated & highly interoperable.
- Content storage & delivery agnostic.
- Advancing supply-chain security.
This protocol is still under development.
Going from a philosophy that “Small is Huge” → Everything works better when it is still small, and complexity comes with size. Solidgrounds wants to adhere to Small Technology principles.
Though there’s a lot of ‘cloud-native’ and ‘serverless’ terminology, the “Wasm Everywhere” paradigm facilitates any scale and any edge devices. Whether services run on a microcontroller IoT devices, mobile phone, web browser, VPS or large cloud clusters… it is all supported.
Opportunity: A niche exists for FOSS ecosystems that focus on ‘smallness’ in their offerings.
What all the current vendors and tech companies exploring Wasm have in common is their love for ‘high scalability’. This is a flaw and a weakness that we in Free Software movement can benefit from. Our scale comes from Decentralization.
Opportunity: Polyglot being intrinsic to “Wasm Everywhere” fits fragmented grassroots efforts.
@Ryuno-Ki mentioned the importance for guild members to have enough alignment in technology use, in order offer most value in services exchange. WebAssembly can be the common glue technology, allowing any member to use their own preferred techstack.
- SQLite gets official Wasm support with help from VMWare’s WasmLabs (see: HN discussion).
WASI has a Capability-based security model. It is a bit confusing how this relates to wasmCloud / Cosmonic projects. This HN comment asks a question, answered by OCaps expert.
In wasmCloud the cryptography is handled by the tooling. For Capabilities you need Claims that are packaged as a JWT. You define the namespaced capabilities yourself, and they become part of the
wasmcloud.yaml of your actor app. You have fine control of what it means when a capability is present, as the capability is defined by its interface (contract based programming). If you expose a
key value store to your app, in production that can mean any KV store implementation is invoked, shielded behind the interface.
Brooklyn Zelenka, CTO/co-founder of Fission Codes gave an exciting Strangeloop presentation “IPVM: Seamless Services for an Open World” (slides) how by the use of Wasm and UCAN ocaps we can get to distributed compute (App Free Computing). (Should beware blockchain influences with Fission).
WebAssembly Components are a proposed extension on Wasm, that allows Wasm Modules to be encapsulated, and become composable and adaptable. The interface, imports/exports and execution environment can be described as “WIT” Worlds, allow Interface-based Programming (Contract-based programming).
Fastly.com presented at the Cloud Native Wasm Day Europe 2023 a demo featuring a visual drawing canvas, allowing WASM components to be inserted e.g. from a component registry (a federated, distributed namespace of Wasm components), connected together with lines to satisfy import and then exported as a
.wasm file that constitutes the composition.
[Vendor] Cosmonic WebAssembly PaaS
“From a simple idea to running your apps anywhere, at scale, in minutes, Cosmonic is the lightweight, low-boilerplate platform that radically simplifies the development lifecycle.”
- “From Sketch to Scale”
- “Any Cloud, Any Edge, At Any Scale”
- “Untangle Dev and Ops”
Cosmonic is a leading early adopter vendor (chairing Cloud Native Foundation). Co-maintainers of wasmCloud, which they brought into the Cloud Native Foundation, and improving compliance for. Their Paas is based on wasmCloud, but they also have several independent OSS projects. Their philosophy is to be (permissive) open-source.
Key aspect in wasmCloud (which has both a Rust and Elixir impl) and Cosmonic is to “separate business logic from non-functional requirements (NFR’s)” … which nears same objective of Clean Architecture pattern’s infra layer, where Ports & Adapters are “Capability” abstractions.
wasmCloud uses a bunch of standards: Open Container Initiative (OCI), Open Application Model, Cloud Events, NATS networking and Open Telemetry.
Note: Cosmonic is also offering visual modeling in their tooling:
[Project] Cosmonic Concordance: Actor-based CQRS/ES
Recently Cosmonic created Apache-licensed Concordance project in Rust, based on wasmCloud. It is opinionated in that the core of the CQRS/ES model is entirely side-effect free. From the README:
Concordance allows you to reason about your application using the fundamental building blocks of event sourcing:
- Aggregates - WebAssembly components that derive state from an event stream, validate incoming commands, and emit events in response to those commands.
- Projectors - WebAssembly components that project read-optimized data (aka materialized views) based on streams of incoming events
- Process Managers - Known as sagas in other paradigms, a process manager is the inverse of an aggregate: it processes inbound events and starts, advances, and stops processes by emitting the corresponding commands.
- Stateless Event Handlers - used for entities such as notifiers and gateways, you can build WebAssembly components that receive events on a stream and then execute whatever you choose for your business logic.
“Constraints liberate, liberties constrain” - Runar Bjarnason
This quote is a foundational principle behind this event sourcing library. You’ll find that aggregates are unable to do anything other than return a list of events. They are unable to produce side-effects, which is a good thing™. Likewise, process managers cannot produce side-effects, they can only return a list of commands. Side-effects are explicitly forced into the perview of notifiers (stateless event handlers).
Concordance looks to be independent of the Cosmonic PaaS, but this product is also big on event sourcing, and the CTO Kevin Hoffman (on the fedi, and writing about fedi) is writing the book Practical Event Sourcing (will be available under Resources page).
Project is under heavy development. The Bankaccount example app for instance is stand-alone (had Concordance classes embedded). Article on how WIT Worlds can shield from framework impl:
- For the Wit! My First Day with Components (Apr 27, 2023)
Bye bye, forge and git… CDE’s are on the rise and offer one-stop-shop developer experiences from the browser. This is going to be a big paradigm shift. Vendors all around are jumping on the fact that software development wrt configuring, deploying, maintaining the infra and cloud have become crazy complex.
WebAssembly-Everywhere offers a path to solving the infra and tooling complexity.
- See: StackBlitz Instant Dev Environments. Uses WebContainers based on Wasm.
- See: Introducing StackBlitz Codeflow (video, 30 min.)
(FOSS is lagging behind. One-stop-shop platforms poses a threat to Free Software if it doesn’t catch up. The #forgers-guild aims to go beyond “forge federation” to “forging free software”, decentralized and scoped to Social Coding FSDL, and bring unique strengths of Free Software movement into play.)
Quite unexpected finding of Naamio app for the Fediverse, based on Wasm, and developed by (mysterious) cooperative Omnify Foundation. Uses ActivityPub, DIDs, Solid, and Verifiable Credentials.
Note: Uses combination of Wasm (fine-grained composition) and gRPC (system orchestration).
The BSD3-Clause project Extism: The Universal Plugin System right now offers integrations for 15 languages and the web browser. Their goal is to make all software programmable, and their plugin system lends sandboxed polyglot support for that. Integration requires a Host SDK and then Plugin Development Kits (PDK’s) in your language to quickly write plugin code.
Example: Elixir Game Server + Extism plugin integration.
Elixir’s actor model handles real-time user interactions playing in a “game arena” via PubSub in Phoenix LiveView, while the games can be written in any language that’s supported by Extism.
- See: Elixir GameServer with Extism (GameBox live demo at Wasm I/O), GameBox live.
- See also: Suborbital Make your SaaS application extensible for developers. (different take)
- See also: The Hashicorp go-plugin ported to Wasm: go-plugin project.
- Plugins in Wasm (polyglot, size-efficient, memory-safe, sandboxed and portable).
- Plugin communication to host compatible with Hashicorp (gRPC-based + Protocol buffers).
- See also: Zellij terminal workspace with Wasm/WASI-based plugin system in Rust.
- (OT related: Elevate Your Plugin Development with Hook-Driven-Development)
Lunatic Solutions offers a wasm-based Erlang/OTP-like actor model implementation in native Rust.
Lunatic combines the fault-tolerance and massive concurrency of Erlang with the capability-based security of WebAssembly, it creates a powerful programming model.
Lunatic is a single executable and runs on Windows, macOS and Linux. It spawns lightweight processes from WebAssembly modules that have their own heap/stack. These processes are preemptively scheduled on a multi-threaded executor.
Looks properly usable. Following demo shows some development with TailwindCSS in Rust:
While Leptos has the more modern approach to Web Design, there’s a more popular web framework in Rust that supports WebAssembly, which is:
- Yew: A framework for creating reliable and efficient web applications.
Yew is set up more as a React-like framework that is diffing the DOM.
[Innovation] Makepad Modern GUI’s in Rust
Though related to the UI topic above this one, Makepad deserves a place of its own. A seriously impressive work in Rust where complex GUI’s are defined by a Figma-like DSL with background code support. It is an effort to bring Coders and Designers closer together. Wasm/WebGL is one of their compilation targets.
This hints at a paradigm beyond the browser straitjacket, moving away from Web 2.0!
Seriously consider watching this video, where the slides are done with Makepad and run real-time multiple applications within it at 120 fps…
One very cool aspect re:Floorplanner is that with Makepad both the IDE and the GUI design can travel within the app itself and be live-coded and changed. Downside: No a11y support (I filed an issue).
I found one Yew project (no longer maintained), called yew-flow (see demo), which was an attempt to port React Flow - best candidate for integration in Floorplanner thus far - and offer that as a Wasm module.
This may not be the best approach… I am thinking more in the line of: Code that wraps any NPM project into a Wasm module or - better - component. A WIT-based component interface would be exposed and allow for different diagram type defitions to be fed to the component, and domain-specific diagram output to be fed back.
[Innovation] Freenet Rebooting
(Update: Freenet.org is not really a reboot, rather a hostile fork by the founder against the community)
Freenet 2023, also known as Locutus, is a fully decentralized, peer-to-peer network and a drop-in replacement for the world wide web. It operates as a global shared computer, providing a platform for sophisticated decentralized software systems. Locutus allows developers to create decentralized alternatives to centralized services, including messaging, social media, email, and e-commerce. It’s designed for simplicity and flexibility and can be used seamlessly through your web browser. The platform’s user-friendly decentralized applications are scalable, interoperable, and secured with cryptography.
Locutus is a decentralized key-value database. It uses the same small world routing algorithm as the original Freenet design, but each key is a cryptographic contract implemented in Web Assembly, and the value associated with each contract is called its state. The role of the cryptographic contract is to specify what state is allowed for this contract, and how the state is modified.
Freenet (or similar concept) might have a role in Prosperity Guilds as a backbone (just an idea).
The operating system of the web – on your device
Web browsers are just the beginning – WordPress Playground works in Node.js, mobile apps, VS Code, and more. Whether you want to build a note-taking application for mobile devices, an automated testing environment, or demo a live WooCommerce store on your site – Playground will support you.
[Project] VectorVisor in Rust
VectorVisor is a vectorizing binary translator for GPUs, designed to make it easy to run many copies of a single-threaded WebAssembly program in parallel using GPUs.
"GPU programming models offer a level of abstraction that is either too low-level (e.g., OpenCL, CUDA) or too high-level (e.g., TensorFlow, Halide), depending on the language. Not all applications fit into either category, resulting in lost opportunities for GPU acceleration.
VectorVisor is a vectorized binary translator which remedies this issue by taking in existing single-threaded WebAssembly programs and running many copies of them using a GPU."
[Product] Nginx Unit Universal Web App Server
NGINX Unit is a lightweight and versatile application runtime that provides the essential components for your web application as a single open-source server: running application code (including WebAssembly), serving static assets, handling TLS and request routing.
Among key features is WebAssembly support that allows running any Wasm modules/components on the server.
[Product] Ambient Game Engine
Game engine built with Rust, WebAssembly and WebGPU. Our WASM use is innovative; it is being used as both a sandboxed runtime for user code, and as a way to run the entire Ambient runtime in the browser. This, paired with our ECS data model, enables a highly modular architecture that allows other developers to make isolated packages (code, 3D models, tools, etc.) that they can add as a mod to your game.
The use of wasm in combination with the Entity Component System may be very flexible in App Free Computing component-oriented social experiences (e.g. modular UX/UI).