AtlatestRenderedmarkdown
Readme

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[0.11.4] - 2026-09-20

Changed

  • The window package is sigil-desktop 0.10 (sigil-app renamed and rebuilt on GLFW: native Wayland or X11 on Linux, picked at startup). The dependency is (from-git url: "codeberg:sigil/sigil-app" name: "sigil-desktop" version: "^0.10.0") until the repository rename lands; the Sigil API of this package is unchanged.
  • No libGL link, no GL headers. sokol_gfx runs with SOKOL_EXTERNAL_GL_LOADER on every native target: src/c/gl_native_loader.h (generated from the vendored sokol_gfx.h by scripts/gen-gl-loader.sh, 122 entry points) fills sokol's GL function pointers through sigil_desktop_gl_get_proc_address in gfx-setup. Linux link-flags are empty (were -lGL); Windows unchanged (none); darwin keeps OpenGL.framework and drops Metal and MetalKit, which nothing used. A game's NEEDED list is now libm, libc and the loader (plus whatever sigil-audio links).
  • sokol_glue.h and the sokol_app.h declaration include are gone. The native environment and swapchain are built in graphics.c from sigil_desktop_framebuffer_size with the values sokol_app's GL backend reported (RGBA8, depth-stencil, no MSAA, framebuffer 0). sokol_log's implementation moved into this package.
  • gfx-setup raises gfx-setup: no OpenGL context when called outside app-run / run-game instead of crashing inside sokol.
  • manifest.scm lists the GLFW compile-time headers and drops libglvnd (Guix's mesa is built without it, and a vendorless libGLX.so.0 on the library path breaks GLX at run time).

Requires

  • Sigil 0.20+ and sigil-desktop 0.10.0+.

Upgrade notes

  • Change your own window dependency line, not just this one. Until the Codeberg repository rename, the window package is fetched from the old URL under its new name, and sigil-build keys a dependency by the name it derives from the URL. A consumer that keeps (from-git url: "codeberg:sigil/sigil-app" version: "^0.9.0") while pulling this release gets two installs of the same repository (.sigil/deps/sigil-app at 0.9 and .sigil/deps/sigil-desktop at 0.10: two window stacks, two slog_funcs at link time). Write (from-git url: "codeberg:sigil/sigil-app" name: "sigil-desktop" version: "^0.10.0") on your own line, bump this package to ^0.11.4, delete build/ once, rebuild.

[0.11.0] - 2026-06-25

Changed

  • Raised the toolchain requirement to Sigil 0.17. The package now declares sigil: "^0.17" (was ^0.15). Sigil 0.17 makes the package-level sigil: field mandatory and derives the native codegen runtime (sigil-lib) from it, so building under the 0.17 compiler requires this bump. This is a minor release because consumers caret-pinning sigil-graphics must move to the 0.17 line.
  • Bumped the sigil-app dependency to ^0.9.0 (the 0.17-line release of sigil-app), since the whole native stack must derive the same 0.17 sigil-lib.

Requires

  • Sigil 0.17+ and sigil-app 0.9.0+.

[0.9.3] - 2026-04-24

Fixed

  • link-flags: now uses (lambda (ctx) (case (target-os ctx) ...)) instead of a host-based (case (host-os) ...) expression. The host-based form evaluated at package-load time on the host, so -lGL leaked into Windows cross-compile builds and caused the final link to fail against zig's MinGW sysroot (which has no matching GL import library). The procedural form re-evaluates at link time with the target triple. Branches themselves are unchanged (linux: -lGL; darwin: -framework OpenGL -framework Metal -framework MetalKit; windows: '(), since sokol_gfx's GL backend dynamically loads opengl32.dll).

Requires

  • sigil-build 0.14.0+ (for the target-os / target-arch helpers and the procedural-link-flags dispatch in collect-native-link-flags).

[0.9.0] - 2026-04-18

Note: skips 0.8.0. The v0.8.0 git tag was used on 2026-03-29 for the initial standalone-repo extraction, but package.sgl was never bumped past 0.7.0 then. To avoid rewriting a published tag, this minor release jumps to 0.9.0.

Added

  • draw-filled-circle x y radius [segments] — filled circle primitive rendered as a triangle fan via sokol_gp. segments defaults to 16 and is clamped to [3, 128]. For tiny shapes (radius 4–6 px), 12–16 segments is plenty; larger circles benefit from more. Draw cost scales linearly with segments, so use the smallest count that still looks round at the target radius — bullet/particle code on hot paths should pick a fixed low count rather than letting it default. Colour comes from the currently bound set-color.
  • set-blend-mode mode and reset-blend-mode — Sigil-level blend mode control. mode is one of 'normal (alpha blend), 'additive, or 'none (no blending). The Sigil wrapper shadows the mode in module state so with-blend-mode can restore the previous value.
  • with-blend-mode mode body ... — scoped form that sets mode, runs body, then restores the previous mode. with-additive-blend body ... is the recommended convenience wrapper for particle / bullet halo rendering — it avoids forgotten restores that would leak the blend state into other draws.
  • current-blend-mode — accessor for the Sigil-tracked blend mode.

Notes

  • Only 'normal, 'additive, and 'none are exposed. sokol_gp also supports premultiplied-alpha, modulate, and multiply modes; those can be added when something needs them. Adding a new mode is a one-line change in blend_mode_from_value (src/c/graphics.c).
  • See examples/circles-blend/ for a side-by-side normal-vs-additive demo. Note: the demo binary build currently fails in the transitive sigil-lib rebuild on a missing minicoro.h include path — this is a pre-existing build-infra bug, not in this package.

[0.5.0] - 2026-02-17

Added

  • Added test harness generation and build support for packages with native dependencies. Improved native package handling, added c-flags field to library struct. Fixed stdlib inclusion in bundles with custom native runtimes, directory structure preservation in compile-c-sources, and absolute sigil-lib include path resolution.
  • Added test coverage.
  • Added test coverage.
  • Added test coverage for TCP/UDP/address operations and crypto primitives.

Fixed

  • Fixed random seed initialization crash caused by flonum-to-bignum promotion in modulo. Fixed status command crash when displaying projected versions for packages without changes.
  • Fixed SSE and remove-after initialization on child elements. Added comprehensive test coverage for routing, middleware, cookies, security, SSE, and response helpers.

Other

  • New packages split from sigil-studio. Font and image modules moved to (sigil graphics *) namespace.
  • GC correctness: added write barriers to all heap mutation sites, enabled GC during compilation with full compiler rooting, and added GC stress testing infrastructure. Completed HAMT dict implementation (printing, equality, collision handling, structural removal). Added arbitrary-precision bignum type with full reader/VM/native/serializer integration. Performance: inline caching for module binding lookups, peephole optimizer with 8 superinstruction patterns. Improved error handling: replaced exit(1) with recoverable errors, fixed error propagation in vm_error_abort and OP_ABORT_TO_PROMPT. Added definition location tracking in stack traces. Implemented VFS/bundle directory listing. Fixed number->string precision for exact IEEE 754 roundtrip. Removed dead opcodes.
  • Configured custom mbedTLS for TLS 1.2 only. Added test coverage for connection predicates, failure paths, and error handling.
  • New packages split from sigil-studio. Font and image modules moved to (sigil graphics *) namespace.