AtlatestRenderedmarkdown
Readme

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[0.12.2] - 2026-09-20

Changed

  • The playback device is miniaudio 0.11.25 (vendored, unpatched, device layer only), replacing sokol_audio. Backends are loaded at run time: on Linux PulseAudio (libpulse.so, then .so.0; pipewire-pulse on a PipeWire desktop), then ALSA, then JACK; WASAPI on Windows; CoreAudio on macOS. Nothing audio-related is linked any more: -lasound, AudioToolbox and ole32/winmm/ksuser are gone from link-flags. A game's NEEDED list loses libasound.so.2.
  • The stream is named after the program (program_invocation_short_name), so pactl list sink-inputs shows the game, not "miniaudio".
  • With no backend library on the machine the mixer runs silent on miniaudio's Null backend and one stderr line says so; audio-setup still succeeds and (audio-initialized?) is #t, as under sokol_audio.
  • src/c/dl-search.c, a byte-identical copy of sigil-desktop's resolver (src/c/DL-SEARCH-ORIGIN.md records the hash and test/dl-search-test.sh enforces it), finds backend libraries in Guix and Nix profiles when the loader alone cannot; miniaudio's dlopen is redirected to it. A program that links sigil-desktop too has both copies; only sigil-desktop's defines dlopen itself.
  • SIGIL_AUDIO_VERBOSE=1 prints the backend, the device, the format conversion miniaudio applies and every resolver hit.
  • manifest.scm no longer needs alsa-lib to build; it lists pulseaudio for the test that opens a device (test/test-device-drain.sgl, which proves the device thread drains a stream).

Added

  • (audio-backend): the backend the device runs on as a symbol ('pulseaudio, also on a PipeWire desktop through pipewire-pulse; 'alsa, 'jack, 'wasapi, 'dsound, 'winmm, 'coreaudio, or 'null when frames are consumed in silence), #f before audio-setup.
  • (audio-device?): #t when a real (non-null) device is open, i.e. when sound can reach a listener. audio-initialized? keeps its meaning (audio-setup ran; the mixer and streams work on every backend), as it had under sokol_audio where an invalid device was silent but initialized; the new predicate names the new fact.
  • SIGIL_AUDIO_BACKEND=pulseaudio|alsa|jack|wasapi|coreaudio|null picks one backend instead of miniaudio's priority walk (tests run the suite with null too; a desktop whose first choice misbehaves can pin one).
  • test/test-device-drain.sgl: opens the real device and proves the device thread drains a stream, and checks the two predicates agree.

Removed

  • vendor/sokol (sokol_audio.h, sokol_log.h) and src/c/sokol-audio.c.

Requires

  • Sigil 0.20+, unchanged. The Sigil API is unchanged.

[0.12.0] - 2026-07-10

Added

  • (sigil audio sink), a portable streaming audio-sink facade that selects its backend with cond-expand. The native arm re-exports the sokol SPSC ring from (sigil audio); the WebAssembly arm imports (sigil browser audio-sink) from the sigil-wasm-audio bridge package, so the same source compiles and runs on both native and WebAssembly. The facade adds WebAudio-shaped context lifecycle ops (audio-context-open, audio-context-resume, audio-context-sample-rate, audio-context-state) and a portable make-float-buffer re-export. On native the context ops are thin shims over sokol's single always-running device.

Fixed

  • WebAssembly builds that depend on sigil-audio for the (sigil audio sink) facade no longer fail to compile. The native audio C (sokol_audio, vendored libogg/libvorbis) has no wasm32-wasi backend, so its C-compilation steps are now gated out of wasm/wasi targets with skip-on-wasm; on wasm the facade delegates to the WebAudio bridge, so none of that C is needed. Native builds are byte-identical (the guard is false).

[0.11.0] - 2026-06-25

Changed

  • Raised the toolchain requirement to Sigil 0.17. The package now declares sigil: "^0.17" and pins sigil-stdlib to ^0.17. Sigil 0.17 makes the package-level sigil: field mandatory and derives the native codegen runtime (sigil-lib) from it, so building under the 0.17 compiler requires this bump. This is a minor release because consumers caret-pinning sigil-audio must move to the 0.17 line.

Requires

  • Sigil 0.17+ (sigil-stdlib / sigil-lib 0.17 line).

[0.10.2] - 2026-04-24

Fixed

  • link-flags: now uses (lambda (ctx) (case (target-os ctx) ...)) instead of a host-based (case (host-os) ...) expression. The host-based form evaluated at package-load time on the host, so Linux link flags leaked into Windows cross-compile builds; a sigil build --config windows-amd64 pass from a Linux host would inject -lasound into the final link and fail against zig's MinGW sysroot. The procedural form re-evaluates at link time with the target triple, so cross-compile configs now pick the right branch. The OS branches themselves are unchanged (linux: -lasound; darwin: -framework AudioToolbox; windows: -lole32 -lwinmm -lksuser).

Requires

  • sigil-build 0.14.0+ (for the target-os / target-arch helpers and the procedural-link-flags dispatch in collect-native-link-flags).

[0.10.0] - 2026-04-24

Added

  • Vendored libogg 1.3.6 + libvorbis 1.3.7 under vendor/ogg/ and vendor/vorbis/. OGG Vorbis encoding/decoding is now self-contained: no external -lvorbis / -lvorbisenc / -logg link dependency, no system libogg-dev / libvorbis-dev packages needed on Linux or macOS.
  • Windows cross-compile target (sigil build --config windows-amd64) — uses zig with x86_64-windows-gnu. WASAPI backend links against -lole32 -lwinmm -lksuser. Verified by building libsigil-audio.a + test-linking a PE32+ Windows .exe.
  • Per-tree vendor/ogg/README.md and vendor/vorbis/README.md recording upstream version + tarball SHA256 + upgrade procedure.

Changed

  • package.sgl library link-flags: dropped -lvorbis -lvorbisenc -logg from every host branch; added a (windows) branch with WASAPI link flags.
  • manifest.scm: removed libvorbis / libogg system deps — vendored sources cover them.
  • Binary size grows by ~1 MB (libvorbis codebook tables dominate). Acceptable trade-off for the install-time ergonomics + cross- compile capability.

[0.9.0] - 2026-04-18

Added

  • Streaming audio sink: open-audio-stream, push-audio-samples, audio-stream-room, audio-stream-depth, audio-stream-capacity, audio-stream-channels, audio-stream-underruns, audio-stream-closed?, close-audio-stream!, set-audio-stream-volume!, audio-stream?. Lockless SPSC ring lets Sigil callers feed interleaved float32 PCM from any thread to sokol_audio's audio thread; coexists additively with play-sound / play-music. See folio topics/sigil-audio-streaming-sink-architecture.

[0.5.0] - 2026-02-17

Added

  • Added test harness generation and build support for packages with native dependencies. Improved native package handling, added c-flags field to library struct. Fixed stdlib inclusion in bundles with custom native runtimes, directory structure preservation in compile-c-sources, and absolute sigil-lib include path resolution.
  • Added test coverage.
  • Added test coverage.
  • Added test coverage for TCP/UDP/address operations and crypto primitives.
  • Added test coverage for TCP/UDP/address operations and crypto primitives.
  • Added test coverage.
  • Added test coverage.
  • Added test coverage.
  • Added test coverage.
  • Added test coverage.
  • Added test coverage.
  • Added opcode-level profiling with --profile flag. Added test harness support for packages with native dependencies. Build safety: warn when replacing the running binary, error on 0-byte output or missing target package. Fixed module cache clearing before running entry points, handling of missing sigil-lib in user-created packages.
  • Added test coverage.
  • Added test coverage.

Fixed

  • Fixed random seed initialization crash caused by flonum-to-bignum promotion in modulo. Fixed status command crash when displaying projected versions for packages without changes.
  • Fixed SSE and remove-after initialization on child elements. Added comprehensive test coverage for routing, middleware, cookies, security, SSE, and response helpers.
  • Fixed assq-ref to return values instead of aliasing assq, added assv-ref. Added async-aware process pipe I/O. Fixed REPL string-length error after exception recovery. Added comprehensive error path tests and GC stress tests for dicts.
  • Fixed Scheme module compilation in build task.
  • Fixed re-import of (sigil core) before calling entry main in bundled applications.

Other

  • New packages split from sigil-studio. Font and image modules moved to (sigil graphics *) namespace.
  • GC correctness: added write barriers to all heap mutation sites, enabled GC during compilation with full compiler rooting, and added GC stress testing infrastructure. Completed HAMT dict implementation (printing, equality, collision handling, structural removal). Added arbitrary-precision bignum type with full reader/VM/native/serializer integration. Performance: inline caching for module binding lookups, peephole optimizer with 8 superinstruction patterns. Improved error handling: replaced exit(1) with recoverable errors, fixed error propagation in vm_error_abort and OP_ABORT_TO_PROMPT. Added definition location tracking in stack traces. Implemented VFS/bundle directory listing. Fixed number->string precision for exact IEEE 754 roundtrip. Removed dead opcodes.
  • Configured custom mbedTLS for TLS 1.2 only. Added test coverage for connection predicates, failure paths, and error handling.
  • New packages split from sigil-studio. Font and image modules moved to (sigil graphics *) namespace.
  • New package split from sigil-studio. Added playlist support with wait-music-end and play-playlist. Fixed native exports in Scheme module.