Sigil 0.20.2

release

An Android toolchain and native-build performance release. Sigil can now build dynamic Android/bionic AArch64 executables with managed Zig and a pinned, data-only Android sysroot, without requiring a separately installed full NDK. Full native release builds also stop compiling their Scheme dependency modules a second time during final bundling.

Download 0.20.2Get started

Existing projects build without changes. Android support is opt-in through an Android build configuration, and the native-build change reuses only objects already validated or produced by the current build invocation.

Build native Android executables without installing a full NDK

Sigil now has an android toolchain for dynamic bionic executables. The CLI installs managed Zig plus the pinned Android NDK r29 headers and target link stubs needed for the requested API, rather than keeping a complete NDK installation:

sigil toolchain install zig
sigil toolchain install android --target aarch64 --api 24

An Android configuration selects toolchain: 'android, target "aarch64-linux-android", and the ordinary native backend. Builds discover a complete managed installation automatically. SIGIL_TOOLCHAIN_DIR can select another durable location, while SIGIL_ANDROID_SYSROOT and SIGIL_ANDROID_LIBC remain explicit overrides.

Release downloads include sigil-android-arm64, a dynamic bionic executable targeting Android API 24 and newer.

The installer verifies the pinned NDK archive before selectively extracting 3,671 headers and 25 link files. A clean installation was exercised from an empty Sigil home, then rediscovered and used for a subsequent build without overrides. The resulting API-24 AArch64 executable ran under Android/Termux.

If the home toolchain directory is not writable, builds use the workspace-local .sigil/toolchain directory. Large downloads and temporary tool caches likewise fall back to writable temporary storage; SIGIL_TOOLCHAIN_CACHE_DIR can choose that location explicitly.

Native sockets work under Android's syscall policy

Android's application seccomp policy can reject the plain accept syscall with SIGSYS, even for an otherwise valid static AArch64 Linux executable. The symptom was a listener that printed its ready message, accepted the first TCP connection, then disappeared without an application diagnostic.

Sigil's native socket runtime now uses accept4(..., SOCK_CLOEXEC) when the target toolchain supports it. It retains an ENOSYS fallback to accept plus the existing close-on-exec setup for systems where accept4 is unavailable. An Android/bionic Slate build served a loopback UI in Termux after this change, including local file and terminal operations from the phone browser.

Target C capabilities are probed instead of guessed

The build API can now compile target-toolchain probes and generate a capability header from the results. This lets runtime code select an implementation based on what the actual target compiler and sysroot provide, rather than host operating-system macros or a growing platform allowlist.

The public surface includes c-probe, probe-c-capabilities, generate-c-capability-header, and c-capability-header-flags. Probe results participate in the native archive inputs, so a capability change cannot silently reuse an incompatible cached runtime.

Release builds no longer compile native modules twice

The package phase already emits and parallel-compiles native Scheme module objects. Final bundling reconstructed their fingerprint without the complete compiler-input closure, rejected the objects it had just built, then emitted and compiled the dependency set again in a serial tail.

Final bundling now recognizes objects whose complete derivation was checked by the current workspace build. That trust is scoped to one build invocation, reset between watch-mode builds, and does not weaken persistent cache keys or the conservative path for direct callers.

In the development baseline under ambient machine load, a forced release build fell from 396 C jobs to 212 and from 634.7 seconds to 260.1 seconds. The differing background load makes the wall-time reduction directional rather than an acceptance benchmark; removal of the 184 redundant jobs and the complete serial dependency tail is exact. Warm serial and parallel release builds produced identical artifact hashes.

Also in this release

Upgrade notes

Nothing is required for existing projects. To build for Android, install the managed Zig and Android toolchains, add an Android configuration to the workspace, then build with that config. The Android installer currently supports AArch64 and defaults to API 24.