sigildocs

Sigil Releases

0.4.0

This release makes Sigil leaner and faster. Native list operations cut compilation time in half, release binaries are 44% smaller, and a new profiling module helps you find bottlenecks in your own code. Macro authors get full hygiene support, and error handling improves with catchable VM errors and cleaner stack traces.

Breaking Changes

  • sigil-web: Renamed UI components from sigil-* to sg-* prefix (e.g., sigil-button becomes sg-button) to mirror data-sg-* attributes

Performance

Profiling revealed hotspots in list operations during macro expansion. Native C implementations of assoc, assq, assv, member, memq, and memv deliver significant speedups:

  • Test suite runs 2x faster (33s → 15s)
  • Module compilation 50% faster
  • Release binaries 44% smaller (3.2MB → 1.8MB)

Macro Hygiene

Full hygienic macro support for syntax-rules and syntax-case. Macros now properly respect lexical scope, preventing accidental variable capture:

  • Local and module-level hygiene
  • free-identifier=? for comparing identifiers during expansion
  • #' reader shorthand for (syntax ...) expressions
  • New (sigil syntax) module with syntax->datum, datum->syntax, generate-temporaries

Error Handling

  • Catchable VM errors: guard can now catch type errors, division by zero, and out-of-bounds access. Use the new vm-error? predicate in (sigil error).
  • Better stack traces: Errors display file paths with line and column positions. Anonymous lambda frames are filtered by default for cleaner output.

Profiling

New (sigil profile) module for performance analysis:

(with-profiling
  (my-expensive-operation))
(profile-report)  ; Shows call counts, timing, allocations

Library Improvements

  • sigil-http: Keyword arguments for make-http-server and http-serve (port:, host:, handler:)
  • sigil-sxml: New sxml->html for converting SXML trees to HTML strings
  • sigil-version: New package for semantic version parsing and comparison

Bug Fixes

  • Fixed source file names in error stack traces
  • Fixed socket API consistency across platforms
  • Fixed with-api-docs path resolution in sigil-publish
  • Fixed sigil-irc package dependency declaration

0.3.0

This release focuses on modular compilation and improved application bundling. Native dependencies like SQLite, TLS, and crypto are now separate packages, so applications only compile what they actually use. The new sigil publish command provides a complete static site generation pipeline, and bundling gains script mode support for simpler deployments.

Breaking Changes

  • sigil-http: API review changes including lazy TLS loading for compile-time independence

Modular Native Packages

Heavy native dependencies have been extracted from sigil-lib into separate packages:

PackageDescription
sigil-sqliteSQLite database bindings
sigil-tlsTLS/SSL support
sigil-cryptoCryptographic functions

Applications that don't use these features no longer compile them, resulting in smaller binaries and faster builds.

Application Bundling

  • Script mode: Bundle single-file scripts with sigil bundle script.sgl
  • Custom runtimes: Build tailored runtimes with only needed native modules
  • Native package detection: Automatic entrypoint generation for native dependencies
  • Production runtime (sigil-run): Script mode support for bundled applications

New Command: sigil publish

Static site generation with a pipeline-based architecture:

(site output-dir: "dist"
      pipeline: (list markdown-processor syntax-highlighter)
      watch-patterns: '("content/**/*.md" "templates/**/*.html"))

Site operators integrate with the threading macro for composable pipelines.

Library Improvements

  • sigil-json: Added json-get-in for nested access
  • sigil-stdlib: New conveniences and predicates from API review
  • sigil-args: New features and comprehensive documentation
  • sigil-test: Native test build integration and new assertions
  • sigil-build: Consolidated shared code and improved test support

Bug Fixes

  • Fixed temp file creation on Windows (sigil-lib)

0.2.0

This release focuses on improving the idiomatic functional programming style of Sigil. New modules for sequences and function composition make it easier to write clean, composable code. Pattern matching gains dict, vector, and struct support, and several APIs have been refined for consistency.

Breaking Changes

  • Module renamed: (sigil exceptions)(sigil error)
  • API changes: map and for-each now operate on single lists only. Use list-map and list-for-each for multi-list operations.
  • Renamed functions: remove-directorydelete-directory, channel-closechannel-close!

New Modules

ModuleDescription
(sigil random)Random number generation, shuffling, and sampling
(sigil seq)Polymorphic sequences and transducers
(sigil array)Efficient fixed-size collections
(sigil fn)Function composition: compose, pipe, partial, juxt

Pattern Matching Improvements

  • Dict pattern matching: (match d ((dict a: x b: y) ...))
  • Vector literal syntax: #(a b c) patterns
  • New forms: match-lambda, match-lambda*
  • Struct and vector pattern support

Other Enhancements

  • Unicode case conversion: char-upcase, char-downcase, string-upcase, string-downcase with full Unicode support
  • HTTP client: Added chunked transfer encoding support
  • CLI: sigil cli upgrade now uses native HTTP client (no curl dependency)
  • Dict utilities: dict-select, dict-rename-keys, dict-get-in for nested access
  • Threading: some-> macro for nil-short-circuiting pipelines

0.1.0

The first public release of Sigil, a practical Scheme for building standalone applications.

NOTE: Sigil is still highly experimental and changing fast, but don't let that stop you from trying it out and providing feedback!

Highlights

  • Standalone executables: Bundle your application with all dependencies into a single binary (~1-2MB base size)
  • Fast startup: Bytecode VM with incremental garbage collection
  • Hygienic macros: Full syntax-rules with syntax-case support
  • Batteries included: JSON, HTTP client/server, sockets, process management, and more

Core Runtime (sigil-lib)

The foundation: bytecode VM, S-expression reader, incremental mark-sweep GC, and native bindings for I/O, filesystem, networking, and process management.

Standard Library (sigil-stdlib)

Nearly complete R7RS base with practical extensions:

  • (sigil core) - Pattern matching, records, delimited continuations, array/dict utilities
  • (sigil math) - Trigonometric, exponential, and bitwise operations
  • (sigil string) - String manipulation utilities
  • (sigil path) - Cross-platform path handling
  • (sigil fs) - Filesystem operations
  • (sigil io) - Extended I/O primitives
  • (sigil process) - Process spawning and pipes
  • (sigil time) - Date/time operations
  • (sigil exceptions) - Exception handling
  • (scheme *) - R7RS compatibility modules

Build System (sigil-build)

Package-based workspace architecture with:

  • Dependency resolution across workspace packages
  • Multiple build configurations (dev, debug, release)
  • Executable bundling with embedded bytecode archives

CLI Tools (sigil-cli)

Development workflow commands:

  • sigil build - Compile packages and dependencies
  • sigil bundle - Create standalone executables
  • sigil test - Run test suites
  • sigil repl - Interactive development
  • sigil format - Code formatting
  • sigil changes - Release management
  • sigil cli - Install and manage Sigil installations

Libraries

PackageDescription
sigil-jsonJSON parsing and serialization
sigil-httpHTTP/1.1 client and server with TLS support
sigil-socketTCP/UDP networking
sigil-websocketWebSocket client and server
sigil-sqliteSQLite database bindings
sigil-gitGit repository operations
sigil-replInteractive REPL with readline
sigil-nreplNetwork REPL for editor integration
sigil-testTest framework with assertions
sigil-formatS-expression code formatter
sigil-markdownMarkdown parsing with frontmatter
sigil-sxmlSXML document construction
sigil-ansiTerminal colors and formatting
sigil-argsCommand-line argument parsing
sigil-hooksExtensible hook system
sigil-mcpModel Context Protocol server
sigil-jwtJWT token encoding and verification
sigil-docsDocumentation generation
sigil-webWeb application framework
sigil-publishStatic site generation pipeline
sigil-ircIRC client
sigil-cssCSS generation from Sigil code
Note: Library APIs may change between minor releases until 1.0. Core modules (sigil-lib, sigil-stdlib) aim for stability.

Platform Support

PlatformArchitectureStatus
Linuxx86_64, aarch64Primary development platform
macOSarm64, x86_64Builds and runs, not yet extensively tested
Windowsx86_64Builds and runs, not yet extensively tested
FreeBSDx86_64Cross-compiles, not yet tested on real hardware
OpenBSDx86_64Cross-compiles, not yet tested on real hardware
NetBSDx86_64Cross-compiles, not yet tested on real hardware
Web/WASM-Runs in browser via Emscripten

Known Limitations

  • R7RS Small coverage is not yet complete; full compliance planned for a future release
  • Limited SRFI coverage

Getting Started

See the Getting Started guide for installation and first steps.