The Sig compiler that knows how much memory it has.
sig retains Zig language compatibility. Rename a file to .sig and the compiler starts caring about where your bytes come from.
Runtime and build-runner release; the compiler and every target's output are
unchanged from 0.6.4. Programs that link no libc on Linux now get file I/O,
the monotonic clock and exit from the Sig runtime itself (raw system calls and
the vDSO), -Dlink-libc=false is honoured for cross targets, and
sig build <step> --self-test works in any project.
$ sig version
sig 0.6.5 (zig 0.17.0)
Bug-fix release for the native aarch64-sb0 backend (SB0X and SB0K images). The
backend now implements @mulWithOverflow, @shlWithOverflow, checked
multiplication, @tagName, saturating +|/-|/<<|, and integers of
129..1024 bits, copies oversized by-value element loads through memory, and no
longer overflows its stack or hangs on part-straddling aggregates. It also fixes
two silent wrong-code bugs in multi-limb overflow arithmetic and 128-bit
multiply. Every other target is byte-identical to 0.6.3.
$ sig version
sig 0.6.4 (zig 0.17.0)
- A database engine of this size (RAMSQL on ZPM) now builds as both SB0X and SB0K images and passes its QEMU loader tests.
- Atomics, vectors and some 128-bit builtins are still unimplemented on
aarch64-sb0; see the changelog for the full list of known limits.
Bug-fix release. sig objdump -d now disassembles Solana sBPF shared objects,
which are deliberately emitted without a section table (shnum=0) per
SIMD-0189. The disassembler is now section-aware-or-segment-fallback: when no
executable section is present it walks the PT_LOAD program segments carrying
the execute flag and decodes from there, so the entrypoint, instruction stream,
and SIMD-0178 static syscalls are shown for programs the loader reads via
program headers.
$ sig version
sig 0.6.3 (zig 0.17.0)
$ sig objdump -d log.so
log.so: ELF 64 shared object
Disassembly (sbpfv3):
; entrypoint
100000000: ...
call 0x207559bd <sol_log_>
exit
objdumpdisassembly falls back to executablePT_LOADsegments (basepc= segmentvaddr) when sections are absent; the section path is unchanged when sections are present.- The sBPF emitter is unchanged — section stripping is intentional per SIMD-0189 and the loadable artifact stays byte-identical.
call <imm>static syscalls show the raw immediate alongside the resolved name (e.g.sol_log_) via the SIMD-0178 murmur3 hash reverse-map.
Internal cleanup release. lib/std/elf.sig drops every deprecated declaration —
the flat Elf32_*/Elf64_* structs, the switch(@sizeOf) aliases, the scalar
aliases, and the deprecated integer-constant aliases (SHT_*, SHF_*, STB_*,
STT_*, STV_*, ELFCLASS*, ELFDATA*, EI_*) — in favor of the typed
Elf32/Elf64 namespaces with enum section/symbol types and packed-struct flag
fields. The compiler's linker, codegen reloc paths, aro backend, and the runtime
startup/dlopen paths were all migrated to the typed model. No user-facing
behavior change; ELF output is byte-for-byte identical.
$ sig version
sig 0.6.2 (zig 0.17.0)
SHN_*,PF_X/W/R,DT_*,NT_*,VER_FLG_*,PN_XNUM, andAuxvare kept (not deprecated); the deprecated families are gone.- Relocation records use a packed
Rel.Info(typelow 32,symhigh 32), bit-identical to the old(sym << 32) | typelayout. - Foreign-endian serialization and Linux process-startup
Auxvreads verified against the typed layout.
Sig can now build and link a loadable Solana on-chain program end-to-end with no
external toolchain beyond sig. A trivial entrypoint deploys and executes on a
current solana-test-validator, and Solana syscalls resolve at runtime via the
SIMD-0178 static-syscall encoding.
$ sig version
sig 0.6.1 (zig 0.17.0)
$ sig build-lib -dynamic -target sbf-solana-solana -mcpu sbpfv3 \
-O ReleaseSmall -femit-bin=program.so entry.sig
- First-class
sbf-solana-solanatarget (OS+ABI+CPU over the reused.bpfelcodegen path, not a new arch), withsbpfv1/sbpfv2/sbpfv3CPU models and a default-mcpu sbpfv3. Listed insig targets. - The self-hosted ELF linker accepts
EM_BPF(the vendored LLD is bypassed for Solana), applies theR_SBF_*relocation family, and emits a relocation-freeET_DYNconforming to the SIMD-0189 stricter-ELF-header contract. - SIMD-0178 static syscalls: a no-library
extern fn … callconv(.c)lowers to acall immofmurmur3_32(name)with no relocation. - No-
compiler_rt, float-free on-chain profile by default for the Solana target, and-dynamicsupport so a.sois produced. - Build driver
tools/build-sbpf.ps1and the full contract/recipe incompiler/SBPF_SOLANA_TARGET.md.
Scope is compiler/toolchain only; the on-chain library lives in SB0LTD/zpm.
A pointer embedded in an SB0X userspace image's initialized data — such as the
.ptr of a []const u8 global that references a string literal — now resolves
to the correct run-time address, so a real userspace program (e.g. a native LSP
server) runs without faulting.
$ sig version
sig 0.5.9 (zig 0.17.0)
- SB0X userspace images are anchored at the fixed virtual load base
(
SB0X_IMAGE_BASE=0x0040_0000, matching the SB0/Nexus loader) instead of being linked base-relative to 0. Anabs64relocation (a 64-bit pointer stored in data that points at another symbol) is therefore written with the correct absolute address; previously it was a base-0 offset that dereferenced a bogus low address at run time. - PC-relative code relocations (
adrp/add/branch) are unaffected — they cancel the base — and the container layout is unchanged (segment offsets and the entry offset stay image-relative). Kernel (SB0K) images are unaffected.
Builds on 0.5.8's full inline-assembler coverage and 0.5.7's two-segment SB0X
userspace images. Found via the SB0/Nexus userspace apps
(sls, stools):
each ships a native *.sb0x loaded at runtime by the generic Nexus kernel. See
the changelog for 0.5.9 and 0.5.8 details.
A self-hosted AArch64 back-end miscompile corrupted the address of a runtime-indexed array element whose element type is large and not a power of two in size. Const-indexed accesses were fine, so the bug only appeared with a runtime index into an array of big records.
$ sig version
sig 0.5.5 (zig 0.17.0)
elemPtrnow materializes the element size into its own register for the general multiply. The result register could alias the index register, and since instructions emit in reverse the size overwrote the index before the multiply ran — computingindex * index + baseinstead ofindex * elem_size + base.
Found via sls: its fixed-slot document store
([N]Document, ~128 KiB per slot) silently dropped writes, so the aarch64-sb0
image returned an empty documentSymbol under QEMU. With the fix the same image
returns the expected symbols. See the changelog for details.
The self-hosted AArch64 back end and SB0 flat-image linker now take a real
bare-metal aarch64-sb0 program all the way to a bootable image — including
the soft-float (f80/f128) compiler_rt routines and the compiler-synthesized
memory intrinsics that any non-trivial program pulls in. 0.5.3 could compile
those routines, but the linker failed to resolve them (undefined SB0 symbol
plus cascading relocation overflows); 0.5.4 closes that gap end to end.
$ sig version
sig 0.5.4 (zig 0.17.0)
What this unlocked, all with no LLVM/LLD:
- The back end legalizes sub-range vector-part copies (e.g. the two 8-byte
halves of a 16-byte
f128in aQregister) and materializes wide (>64-bit) integer constants into vector registers — the last codegen gaps the soft-floatcompiler_rthit. - The SB0 linker resolves a definition exported under several names
(
compiler_rt's comparisons export one body as__cmptf2/__eqtf2/__lttf2/…) and binds compiler-synthesized runtime libcalls (memcpy/memset/memmove) to theircompiler_rtbodies. - The SB0 linker evaluates the linker script's location counter to define
boundary symbols (
__stack_top,__bss_start/__bss_end, …), so a freestanding reset entry can reference them from inline asm. - The inline assembler accepts
//line comments and encodesb .as a self-branch.
The result: the sls language server links to a
valid SB0K image and boots under QEMU, serving LSP over the PL011 UART. See the
changelog for the full 0.5.4 fix list.
The self-hosted AArch64 back end is now complete enough to compile the entire
compiler for the native aarch64-sb0 target — with no LLVM, no LLD, and no
foreign object container. The self-hosted SB0 linker also emits a bootable
SB0K kernel image (selected by the presence of a linker script) alongside the
SB0X userspace image.
$ sig version
sig 0.5.0 (zig 0.17.0)
Under the hood this required full code generation for aggregate optionals
(e.g. ?Token), tagged-union field extraction, and correct sret/aggregate
field stores in the AArch64 code generator — enough that
compiler/sb0_native_runner.sig, which imports all of main.sig, compiles
cleanly for aarch64-sb0 and boots in QEMU as the compiler service itself.
Dependency resolution in sig build. A project's build.sig.zon can now
declare dependencies as fetched tarballs:
.dependencies = .{
.zpm = .{
.url = "https://github.com/SB0LTD/zpm/archive/<ref>.tar.gz",
.hash = "<sha256>",
},
},sig build fetches each dependency into the global cache, verifies its SHA-256,
extracts it, and exposes its modules to build.sig via
ctx.getDependency("zpm").modulePath("src/...") — no vendored source, no
hardcoded paths. See the
changelog for the full 0.5.0 capability set and limitations.
Sig gains a pure-Sig, self-hosted linker for the native SB0 target. Compiling
aarch64-sb0 with -ofmt=raw -fno-llvm emits a complete SB0X image directly —
no LLD, no ELF/PE intermediate. The linker resolves external, global, and lazy
symbols, so ordinary programs (slices, loops, optionals, error unions, and the
memset/memcpy runtime they reference) compile end to end through the
self-hosted AArch64 code generator with no LLVM.
$ sig version
sig 0.4.1 (zig 0.17.0)
The SB0X/SB0K native image format is now a canonical, dependency-free
zpm module (platform/sb0x), mirrored
byte-for-byte inside the compiler. The self-hosted backend is not yet the
default for the LLVM platforms; LLVM remains the release backend there. See the
changelog for the
verified capability and current limitations.
The compiler, standard library, native build runner, and canonical test suite are
Sig source. The repository tracks no .zig source files, and the bootstrap and
release stages invoke Sig—not an upstream Zig executable.
$ sig version
sig 0.4.0 (zig 0.17.0)
sig build executes build.sig through the fixed-capacity native runner. The
production graph compiles Sig, installs the library, and runs the real 224-test
compiler suite. -target aarch64-sb0 remains a first-class native target with
no libc or dynamic-linker fallback.
The packaged Sig alias preserves the upstream-compatible machine-readable
version-only output, while sig version identifies both the Sig and Zig-base
versions.
| Platform | Backend | Download |
|---|---|---|
| x86_64-linux | Full LLVM 22.1.8 | tar.xz |
| aarch64-linux | Full LLVM 22.1.8 | tar.xz |
| aarch64-macos | Full LLVM 22.1.8 | tar.xz |
| x86_64-windows | Full LLVM 22.1.8 | zip |
| aarch64-sb0 | Native allocator-free SB0K runner | sb0k |
Every package contains the same full LLVM target set and the same Sig standard library. Linux and macOS execute on their build hosts, Windows executes on a Windows runner, and aarch64 Linux executes under QEMU user-mode before the release can be published.
The SB0K release asset boots as the compiler service itself: it accepts one
bounded SB0C request, compiles through the SB0-only fixed-capacity pipeline,
and returns an SB0X image. Its request encoder and response extractor are also
strict .sig programs using fixed storage and raw syscalls—Python is not part
of the runner or its release gate. See
compiler/SB0_NATIVE_RUNNER.md for the wire
contract and reproducible QEMU invocation.
The final release is produced by Sig itself. CMake and upstream Zig are absent from the bootstrap and release stages: an immutable native Sig stage0 creates the four verified bootstraps, and those bootstraps compile the final LLVM-backed Sig executables with immutable LLVM closures.
The .sig extension activates strict mode. Same syntax. Same parser. Same compiler. But allocator usage becomes a compile error.
// foo.sig — business as usual
var list = std.ArrayList(u8).init(allocator);
try list.appendSlice(data);
// foo.sig — you bring the buffer, you know the cost
var buf: [4096]u8 = undefined;
const result = try sig.fmt.formatInto(&buf, "{s}: {d}", .{ name, count });Four errors replace silent reallocation:
| Error | When |
|---|---|
BufferTooSmall |
Output exceeds the caller-provided buffer |
CapacityExceeded |
Bounded container is full |
DepthExceeded |
Recursion hit its limit |
QuotaExceeded |
Resource cap reached |
Standard Sig error unions. try, catch, orelse. Nothing new to learn.
Sig stays synchronized with upstream Zig while maintaining its sovereign compiler, strict-mode, build-runner, and release layers.
When a new commit lands in ziglang/zig, it fires a GitHub dispatch. The sig-sync workflow cherry-picks the commit, resolves conflicts (keeping Sig-owned files), validates the bootstrap, and pushes. If the standard library changed in a way that breaks the bootstrap, it triggers a rebuild chain automatically.
The result: sig never drifts. You get upstream bug fixes, optimizations, and new features without waiting.
| Latest upstream commit | b7104c95 |
| Last sync | 2026-09-17 |
| Upstream | codeberg.org/ziglang/zig |
| Base version | Sig 0.17.0-dev - LLVM 22.1.8 |
| Sync frequency | Every commit (< 1 min latency) |
# Download the latest release
mkdir -p sig-toolchain
curl -sL https://github.com/SB0LTD/sig/releases/latest/download/sig-x86_64-linux.tar.xz \
| tar -xJ -C sig-toolchain --strip-components=1
export PATH="$PWD/sig-toolchain/bin:$PATH"
# Or build from source (requires an existing Sig compiler)
git clone https://github.com/SB0LTD/sig.git && cd sig
sig build -OReleaseFastThe executable and lib/ directory are a matched toolchain unit. Normally Sig
finds the adjacent library automatically. If SIG_LIB_DIR is set globally,
unset it or point it at the extracted sig-toolchain/lib; mixing compiler and
library versions can make the build runner fail before your build begins.
It's language-compatible by design. Existing .zig files compile unchanged;
rename a source file to .sig when you're ready to enable strict mode.
build-llvm → build-bootstrap → release
7 immutable LLVM closures 4 verified host bootstraps 4 LLVM-backed toolchains
Each stage publishes an exact manifest, SHA-256 set, source commit, producer, and workflow run. Drafts become visible only after every required artifact and target-specific execution probe succeeds. Bootstrap and final compilers also run the canonical 224-test native compiler graph with an explicit fixed stack budget, then cross-compile and validate an AArch64 object.
Same as upstream Zig — MIT. See LICENSE.
