Commitc7baaad1Recorded12 Jul 2026Repositorysigil-dsp
sigil-dsp: add first-class web (wasm32-wasi) config
Message
soundpipe + the DSP natives are portable C (no platform deps) and compile + run under wasm32-wasi — verified: all 44 soundpipe modules build clean and a linked sp_osc produces a correct 440Hz waveform under WASI. Adds a web config so sigil build --config web produces libsigil-dsp.a as a wasm archive (46 wasm objects, 0 ELF), enabling motif's streaming render path (composition -> PCM) in the browser. Same library/build task serves native and web; only the target differs. No dep gating needed (sigil-dsp's only runtime dep is sigil-stdlib).
Changed
package.sgl | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)Diff
package.sglmodified
@@ -22,7 +22,20 @@
22
name: 'release 23
output-dir: "build/release" 24
debug?: #f−25
optimize: 2))+25
optimize: 2)+26
+27
;; Web (wasm32-wasi): soundpipe + the DSP natives compile cleanly for wasm+28
;; (verified — portable C math, no platform deps), so motif's streaming+29
;; render path works in the browser. The same library/build task serves+30
;; native and web; only the target differs.+31
(config+32
name: 'web+33
output-dir: "build/web"+34
toolchain: 'zig+35
target: "wasm32-wasi"+36
debug?: #f+37
optimize: 2+38
features: '(web wasm))) 39
40
dependencies: (list 41
(from-git url: "codeberg:sigil/sigil" package: "sigil-stdlib" version: "^0.17"))