@psalomo/wasm-music-faust
v0.1.1
Published
The Faust compiler (faust-rs) built for wasm32-unknown-unknown with the AssemblyScript backend and the Faust standard libraries embedded — the compiler module loaded by WebAssembly Music.
Maintainers
Readme
@psalomo/wasm-music-faust
The Faust compiler — the Rust implementation,
faust-rs — built for
wasm32-unknown-unknown with the AssemblyScript backend enabled and the
Faust standard libraries embedded.
This package ships one artifact, faust-compiler-module.wasm, and no JavaScript. It is
the compiler module loaded by
WebAssembly Music to turn .dsp sources into AssemblyScript.
Using it
The module is a plain wasm32 module: no emscripten loader, no MEMFS, no imports.
const bytes = await (await fetch(
'https://cdn.jsdelivr.net/npm/@psalomo/[email protected]/faust-compiler-module.wasm'
)).arrayBuffer();
const { instance } = await WebAssembly.instantiate(bytes, {});Compilation goes through faust_wasm_generate_aux_files_json(name, source, args),
with strings written into memory via faust_wasm_alloc. Failures carry a
structured diagnostics-v2 report on the result handle
(faust_wasm_text_result_diagnostics_ptr/_len). See
faust-rs-transpile.js
for a complete working host, and the
faust-rs error model for the
diagnostics schema.
Because import("stdfaust.lib") resolves from libraries embedded at build
time, no library files need to be provided at runtime. Sibling sources travel
inline as --virtual-source <path>=<base64> arguments.
This build
| | |
|---|---|
| compiler module | faust-rs-wasm-ffi/0.5.0 |
| faust-rs commit | 03abb1d6090f9b50f337f67f28bf492ab90a858e |
| faustlibraries commit | ac43216dda778d9cd60624ad1f6a918e112ea861 |
Built and published by this workflow, which validates every module before release.
License
The compiler is GRAME's work, not this project's:
faust-rs — a Rust port of the FAUST compiler Copyright (C) 2026 GRAME, Centre National de Creation Musicale Derived from the FAUST compiler, Copyright (C) 2003-2024 GRAME.
Licensed under LGPL-2.1-or-later; the full text is in LICENSE, copied
from the faust-rs revision this module was built from. This package only
repackages that build for npm.
