How Faust DSP Connects to WebAssembly and NEAR on petersalomonsen.com
Updated
Faust DSP code is turned into WebAssembly on this site through a tool called faust2as, which compiles Faust DSP to AssemblyScript so it can run as WebAssembly inside the WebAssembly Music environment. The demos and concert material that use this pipeline load directly from git repositories stored on the NEAR blockchain via wasm-git. That combination — Faust for the audio DSP, AssemblyScript/WebAssembly for execution in the browser, and NEAR-backed git for storage and distribution — is the core of how these pieces connect.
The three layers and what each one does
The setup separates cleanly into a language/compiler layer, a runtime layer, and a storage/distribution layer.
| Layer | Technology | Role |
|---|---|---|
| DSP source | Faust | Describes the synthesizer and audio processing logic |
| Compilation target | AssemblyScript → WebAssembly (via faust2as) | Makes the DSP runnable in the browser |
| Runtime environment | WebAssembly Music | Hosts synthesis, sequencing, and live performance |
| Storage / distribution | wasm-git on NEAR | Serves the demo and concert code from on-chain git repos |
faust2as: Faust to AssemblyScript to WebAssembly
Faust is normally a DSP language with its own backends. Here the path is different: faust2as compiles Faust DSP code to AssemblyScript, which then compiles to WebAssembly. The practical result is that a Faust-described instrument becomes a WebAssembly module that can be instantiated and run inside the WebAssembly Music environment, rather than only in a native or standalone Faust context.
WebAssembly Music as the runtime
WebAssembly Music is the environment where the compiled instruments actually play. It hosts synthesis and sequencing, and it is where live coding and performance happen. So the Faust-derived WebAssembly modules are not standalone apps — they are components loaded into this browser-based music environment.
NEAR-backed git via wasm-git
The demos and the concert material do not load from a conventional server path. They load directly from git repositories stored on the NEAR blockchain via wasm-git. wasm-git is the project that brings git into WebAssembly, and here it is paired with NEAR so that the repository content lives on-chain and is fetched into the browser.
Where this was demonstrated
At the International Faust Conference 2026 (IFC 2026) in Cannes, the author showed how Faust DSP code can be compiled to AssemblyScript and run as WebAssembly inside the WebAssembly Music environment. The concert and the Faust-to-AssemblyScript demo both load from git repositories stored on the NEAR blockchain via wasm-git. The concert recording is online, with the author's own set starting at 1:27:30.
Why the combination matters
Each piece solves a different problem:
- Faust gives a concise, high-level way to describe DSP.
- AssemblyScript/WebAssembly makes that DSP run efficiently in a browser without native installs.
- wasm-git on NEAR gives the code a decentralized home with full history, so a performance or demo can be reproduced from the repository itself.
For anyone exploring this stack, the useful takeaway is the pipeline shape: write DSP in Faust, compile it toward WebAssembly through AssemblyScript, run it in a WebAssembly music runtime, and distribute the source through git stored on NEAR.