Sigil 0.24.2
A compiler, build and file I/O release. Direct WASM turns eligible self tail calls into loops, native applications can choose their collector settings at build time, and new file operations let programs create private files and sync writes to disk. sigil-apps joins the workspace packages published to the registry.
Direct WASM loops and builds
At optimization levels O1 and O2, a tail call back to the same function now becomes a loop when the compiler can prove the target won't change. This removes the closure call on each iteration for eligible named-let and letrec loops. O0 keeps the existing calls.
Direct WASM also does less work to keep live values available to the collector: known calls publish only their live set, and functions store their own roots directly in their frame. Rebuild the application and its runtime companion together to use the new runtime operation.
Bundled application startup
Bundled modules are now hashed only when an effect check needs the hash, instead of during ordinary module loading. Together with Tessera's launcher changes, this reduced the launcher's median time to first screen from 272.4 ms to 211.1 ms, with 12 runs per variant.
Collector settings per application
A native executable's package.sgl build configuration can now set its nursery budgets with gc-young-initial-kib: and gc-young-max-kib:, control adaptive nursery growth and automatic minor collections with gc-adaptive-young: and gc-minor-enabled:, and set major-collection budgets with gc-heap-grow-factor:, gc-major-initial-kib: and gc-major-min-headroom-kib:.
These settings apply from startup to every VM in the built executable. Existing environment overrides still take precedence. Omitting the settings keeps the existing defaults; this release chooses no new collector values for any program. WebAssembly and UEFI builds refuse these settings. Measure pauses and retained memory before choosing values for an application.
Private files and durable writes
open-output-file, open-binary-output-file, write-file-string and write-file-bytes now accept mode: and exclusive:. On POSIX, mode: #o600 exclusive: #t creates a new private file without a window between creation and chmod. The process umask still removes requested bits, and exclusive creation refuses existing files and symlinks.
(sigil fs) adds file-mode and set-file-mode! for reading and changing permissions, sync-file for flushing an open output file to disk, and sync-directory for persisting directory changes after a rename. Windows, WebAssembly and UEFI raise io-error for permission changes, sync operations and non-default creation options.
The separate sigil-crypto 0.20.0 companion release adds SHA-512 digests and SHA-512-crypt password hashing for Unix $6$ shadow entries.
sigil-apps in the registry
sigil-apps now shares the toolchain version and ships to the registry for the first time, bringing the release to 26 workspace packages. It validates application release manifests and trust grants; it does not fetch or install applications. Release builds now check that every workspace package sharing the toolchain version is included for publication.
Fixes
- Sandboxed external builds could reject an output that recorded its own
/sigil/storeprefix as a host-path leak. That prefix is now allowed in the canonical store; physical scratch paths and undeclared or build-only store references are still refused. - Struct fields and expression data named
libraryorincludecould prevent modules and their importers from using the compiled cache on subsequent starts. Those names no longer prevent cache reuse. - Scoped registry packages such as
sigil/sigil-cryptowere missing from.sigil/deps.index, while scope directories appeared as broken dependencies. The index now lists each package under its full name. - A subprocess's cached input, output or error port could be reclaimed during a minor collection while the process was still alive. Those ports now stay live with their process.
- Direct WASM module bytes could change depending on whether a procedural macro had already been loaded. Declared syntax exports now stay consistent across build orders.
- A compiler comment or unused emitter edit could change Direct WASM core interfaces. Those interfaces now depend on the compiler's ABI and semantic build settings, so source-only edits leave them stable.