Sigil 0.17.17

release

A native-codegen continuations release. Delimited continuations, coroutines, and generators now work correctly under the native backend compiled to WebAssembly, closing the last place they didn't. A companion fix stops long-running coroutine and async workloads from exhausting the fiber table, macro errors got much more specific, and there's a new experimental opt-in for compiling the standard library to native code. Existing projects build without changes.

Download 0.17.17Get started

Delimited continuations work under native WebAssembly codegen

reset/shift, call-with-prompt, coroutines, and generators now run correctly when compiled through the native backend to WebAssembly. Before this, a continuation that resumed into a loop and then suspended again would either replay the loop from the beginning or trap outright, so anything built on delimited continuations was unreliable on the wasm native target. Desktop native was already fine; this closes the wasm-specific gap, which was the last asterisk on native continuations. Getting here also hardened the asyncify instrumentation the native backend emits, so that machinery is on firmer ground generally.

Coroutines and async workloads stop leaking fiber slots

Every prompt-wrapped resume that suspended again used to strand a fiber slot. After about 60 exchanges, or 60 suspending scheduler slices, the fiber table filled up and continuations broke with a confusing "car: expected pair". This is fixed at the root: an abandoned wrapper fiber is freed the moment its continuation becomes unreachable, and completed fibers are reclaimed immediately in both resume paths. A coroutine loop that used to die around 60 exchanges now runs cleanly through hundreds, and a 100-iteration receive-loop (the shape a long-running message client uses) is a permanent regression test now. Multishot continuations keep working: a continuation invoked after its fiber has completed replays from its own captured state, so its lifetime follows ordinary garbage collection. And a fiber left suspended mid-computation whose continuation is then dropped, never resumed and never completed, is reclaimed too, by a sweep during major garbage collections, so the fiber table cannot fill from abandoned work of any shape.

Macro transformer errors say what actually went wrong

A define-syntax whose transformer isn't callable used to fail with a generic "transformer must be a procedure", which is nearly useless in a large module graph. The error now names the macro, the module it lives in, and the actual value class it found. That one change is what pinned a startup failure in the experimental native-stdlib path below.

Experimental: compiling the standard library to native code

A new opt-in, the SIGIL_NATIVE_DEPS=1 environment variable, compiles dependency modules including the whole standard library to native code inside a bundle, instead of shipping them as bytecode. It is off by default and still experimental. The early numbers are promising: a native-stdlib CLI reaches the compile phase in about 1.6 seconds versus about 9.5 for the full bytecode path. A couple of gaps remain before it can become the default, so treat it as a preview. Default builds are unchanged.