Sigil 0.7.0
Parallelism and production readiness. Sigil gains multi-core execution, better I/O scalability, proper exception semantics, machine-readable procedure specifications, structured logging, and four new packages. With the stability and DX foundations from 0.5.0 and 0.6.0, this release focuses on the features needed to build and run serious applications.
Multi-VM Threading
The headline feature. Each thread-spawn creates a new VM with its own stack, heap, GC, symbol table, and module registry — zero shared mutable state, no locks needed. Threads communicate by message passing with automatic serialization/deserialization. parallel-map provides a high-level API for data-parallel workloads, partitioning work across N workers and collecting results.
Tail-Optimized Exception Handling
Replaced prompt-based exception handling with a dedicated VM-level handler stack. guard bodies now execute in true tail position, eliminating the 512-prompt practical limit. Deep recursive guard patterns (10,000+ iterations) work without overflow. Closure arity errors are now catchable by guard. Cross-context exception propagation works correctly through eval and load boundaries.
I/O Multiplexing
Replaced select(2) with epoll (Linux) and kqueue (macOS/BSD) behind the existing socket-select and fd-select APIs. Purely internal change with no Scheme API impact. Handles 200+ concurrent file descriptors efficiently.
Preemptive Yield Points
Yield checks at loop back-edges prevent CPU-bound tasks from starving other coroutines in the async scheduler. Default disabled — only activates when running inside with-async. Configurable interval via SIGIL_YIELD_INTERVAL environment variable.
Procedure Specifications
Machine-readable specs for procedure parameters and return values using real Scheme predicates. Specs use the inline (: ...) syntax placed as the first expression in a define or lambda body:
(define (add a b)
(: number? number? -> number?)
(+ a b))- Runtime checking: Optional predicate checks gated by the
sigil-checksfeature — zero cost in release builds - Predicate combinators:
any-of,maybe,list-of,none-offor expressive type constraints - Struct field annotations:
define-structfields accept type predicates, auto-generating specs for constructors, accessors, and mutators - Full coverage: 330+ specs across 35+ modules, all audited against conventions
- Tooling: Specs displayed in MCP search/exports output and generated API documentation
define-native Compiler Form
Declares bindings provided by native C code at runtime. Scheme modules can document and export native functions without fallback implementations, with optional specs and docstrings. Uses the new OP_DEFINE_IF_UNBOUND opcode to avoid overwriting native bindings registered at VM startup.
New Packages
| Package | Description |
|---|---|
sigil-tui | Immediate-mode terminal UI toolkit with native C grid, layout system, components, event parsing, and text input |
sigil-jmap | JMAP email client (RFC 8620/8621) with session discovery, mailbox operations, email query/send |
sigil-yaml | YAML parsing and serialization with block/flow collections, block scalars, anchors/aliases, multi-document |
sigil-log | Structured logging with levels, text/JSON output, configurable targets, and lazy macros |
sigil-tui-demo provides a chat client simulation exercising all TUI components.
HTTP Improvements
- Streaming HTTP download support with binary-safe reads
- File serving with Range request support and port positioning
Developer Tooling
- MCP server: Procedure specs shown in search and exports output
- API docs:
sigil docs apifixed and now displays spec signatures in generated documentation - Build system: Test compilation propagates build config features (e.g.,
sigil-checks)
Bug Fixes
- Fixed false positive capture corruption check in serializer
- Fixed Windows build: mingw macro collision with
_inlinefield name - Fixed Windows build: use
define-nativeforunix-connect(not available on Windows) - Fixed exception handler double-pop causing test runner segfault
- Fixed bootstrap compilation: replaced
whenwithifin%set-spec!