Sigil 0.17.19

release

A responsiveness release with two new capabilities. The headline is a scheduler fix that removes a roughly 100 millisecond stall from interactive apps: typing into a terminal or shell session that Sigil drives, and the output coming back, are now near-instant instead of laggy. Alongside it: pipe-based process primitives for driving a subprocess over ordinary pipes, and a WebAssembly binary lane that lets a wasm app return raw bytes to its host without encoding them to a string. Bytecode projects build without changes; native builds should be rebuilt from clean, since the native module ABI changed.

Download 0.17.19Get started

Interactive apps stop stalling about 100ms per event

An app that waited on a network connection and a terminal or subprocess session at the same time hit a scheduler stall: readiness on one had to wait out a full quantum of about 100 milliseconds blocked on the other. A keystroke's round trip measured about 100ms and an echo about 200ms, felt as constant lag. The scheduler now waits on both at once, so either wakes it immediately: those round trips now measure about half a millisecond, roughly 200x faster. Timers, goroutines, and sleep are unchanged, and the idle scheduler still sleeps at near-zero CPU. (This is separate from 0.17.18's idle-CPU fix: that one cut the work per idle wake, this one removes the lag between an event and the reaction.)

Run a subprocess over pipes, not just a pty

New (sigil process) primitives run a child process with its stdin and stdout on ordinary non-blocking pipes, a companion to the pty-based ones. Some programs refuse to run on a terminal (a tmux control-mode client hard-fails on a tty), and a plain pipe is the transport they need: process-spawn-pipe to launch, process-stdout-fd and process-stdin-fd to wait on readiness, process-pipe-read and process-pipe-write for non-blocking transfer, and 1process-pipe-close-stdin! to signal end of input. Additive and Unix-only; existing spawn behavior is unchanged.

WebAssembly apps return binary data to the host without encoding it

A Sigil program compiled to WebAssembly returned its results to the JavaScript host through a text-only channel, so anything binary (an image, a font, a decoded file) had to be encoded to a string first, slow enough to be visible for a multi-megabyte payload. The channel now carries a bytevector's raw bytes directly, with a flag the host reads to tell bytes from text. Text results are unchanged. A browser-hosted Sigil app can now move an image or other binary file to the page as bytes, decoded in wasm and handed across to become a Blob, instead of paying a per-byte encoding cost.