Abla 0.2.67 adds signed downloads, WASI commands, RISC-V Linux and Windows ARM64 targets.
Before you upgrade
- Resolve relative compile-time paths against the source file that uses them. The working-directory fallback is gone. This also applies to the output and slice paths in iOS XCFramework packaging.
- Release executables for hosted x86-64 and AArch64 Linux now free unreachable allocations on a helper thread and can collect in parallel by default. The full release notes cover the opt-outs.
- This is the first release with a signature for
SHA256SUMSand a software bill of materials. Verify downloads before unpacking.
What you can try
- Build a WASI Preview 1 command with
--target wasm32-wasiand run it under Wasmtime. It supports standard streams, arguments, environment variables, and files through a preopened directory. - Build libc-free programs for RV64GC Linux with
--target riscv64-linux, or cross-build Windows ARM64 programs with--target aarch64-windows. The targets guide covers the available modes. - Use the static AArch64 Linux compiler with a matching sysroot. It includes LLVM and the linker and can build on an empty
PATH.
Verify this release
Save SHA256SUMS, SHA256SUMS.sig, and the project's release-signing.pub alongside your download. To verify the signature and the file together, run tools/verify-release.sh from the release tag's checkout in Bash (Git Bash or WSL on Windows). Pass the directory containing the downloads and the exact filename you downloaded.
bash tools/verify-release.sh /path/to/downloads abla-toolchain-x86_64-linux.tar.gz
To verify manually with OpenSSH, run these commands in the download directory and set archive to your download's filename.
awk 'NR == 1 { print "ablac-release " $1 " " $2 }' release-signing.pub > allowed-signers
archive=abla-toolchain-x86_64-linux.tar.gz
ssh-keygen -Y verify -f allowed-signers -I ablac-release -n abla-release -s SHA256SUMS.sig < SHA256SUMS &&
awk -v archive="$archive" '$2 == archive { print }' SHA256SUMS | shasum -a 256 -c
Installation and downloads · Language tour · Standard library reference
Full release notes
Behaviour changes and migration (read first)
- The working-directory fallback for compile-time paths is gone (6c995371, #1044, decision #91 A and #95 A). v0.2.66 still took a relative path from the working directory, with
warning[W_BUILD_PATH_CWD], when it was not found beside the source file. Now: - Build calls (
buildProgram,compilerBuildProgram,wasmBuildModule, an independent module's emit) and compile-time file access (#compilerWriteFile,abla/fsin#code) read every relative path against the source file's directory, always. A missing entry isE_SOURCE_NOT_FOUND. W_BUILD_PATH_CWD,E_BUILD_PATH_CWDandABLA_BUILD_PATH_CWDare removed.- Migration: a build that gave the warning on v0.2.66 now fails. Rewrite the path relative to the source file, as the warning said. The
./build/...spelling from v0.2.66 keeps working and means the same thing. - iOS XCFramework packaging follows the same rule (c82cad7d).
iosCreateXcframework(output, slices, headersDirectory)used to read all three from the working directory, unlike thebuildProgramcalls that make its slices. Its output and slices are now read and written against the calling source file, inside its project, and its headers directory is a read (an absolute one is used as given). A path outside the project isE_BUILD_PATH_OUTSIDE. On a host other than macOS,E_IOS_XCFRAMEWORK_HOSTnow names the resolved package path. - Migration: packaging paths that were spelled from the repository root become relative to the source file, the same paths its
buildProgramcalls use. - Release builds collect with a helper thread by default (2ece0285, decision #107 B). A release (not
--fast) executable for hosted x86-64 or AArch64 Linux is now built with background freeing: each collection hands what it found unreachable to a runtime helper thread, and a program that never asked for collection threads gets four (fewer on a machine with fewer CPUs) at its first collection. Results are the same; the process has the helper thread, and every release executable carries the parallel collector. The x86-64 Linux static toolchain ships that collector optimized once and links it (6e72e0e0), so a cold release build of hello costs about what it did without the default (3.46G instructions, about 1% more than the 3.43G before the default, against 4.73G with the collector compiled into the program; nine paired runs); hello's.textis then 45,819 bytes (37,360 with the collector compiled in). Another toolchain, or a standard library that no longer matches the shipped digest, compiles the collector into each release program, at that higher cost.--fastbuilds, libraries, objects, Wasm and macOS are built as before, and so is a program that sets manual collection. - Opting out:
memorySetBackgroundFree(false)orABLA_GC_BACKGROUND=0(which wins over the call) turns the helper off;memorySetGcWorkers(0)orABLA_GC_WORKERS=0keeps collection on one thread. - Known issue, not fixed in this release: a dependency inherits every compile-time capability the root grants. Compile-time grants are still computed for the whole program: if the root
abla.tomlauthorizes, say,environmentorfilesystem.readfor its own#code, a dependency's#code gets it too, whatever the dependency's own manifest declares (trusted.nativeincluded, when the root grants it). Until per-package grants land (#1142, planned for v0.2.68), grant compile-time capabilities only in projects whose dependencies you trust. - Known issue, to be fixed in v0.2.68: a vendored package is trusted by its marker files.
vendor/<name>/is used when its.abla-revisionand.abla-digestmarkers match the lock, without hashing its files, so an edited vendored source builds without an error. Review changes undervendor/as you would your own code until v0.2.68 checks the tree against the lock's digest. - Known issue: Programs built for Windows that use network sockets can crash, or read memory past a buffer, when a connection is reset or a socket read fails or times out. A remote peer can cause this. There is no workaround; rebuild with v0.2.70.
- Known issue: Android libraries built with the release (static) Linux compiler are generated as if for plain Linux on arm64, not for Android. They use native ELF thread-local storage instead of emulated TLS, so on Android 7 to 9 (API levels below 29) loading such a library can fail. They also use register x18, which Android reserves (on Android 9 and later it holds the shadow call stack), so a library may crash on any Android version. To work around it, set
ABLA_CODEGEN_INPROCESS=0and have LLVM'soptandllconPATH(or setABLA_LLVM_TOOLS): the compiler then runs them instead of its own code generation, and the library is built for Android. This affects v0.2.66 and later. Fixed in v0.2.71. - Known issue: On Windows on ARM64 (aarch64-windows) only, a program that uses AES-GCM ends on its first call with "fatal signal: Windows exception 0xc000001d". That includes every TLS client and server, and anything using abla/crypto/aes: the CPU feature check reads a register Windows does not let programs read. There is no workaround in the program. Rebuild with v0.2.72. x86-64 Windows, Linux and macOS are not affected. (Found by the Windows ARM64 CI lane; no user has reported it.) Fixed in v0.2.72.
- Known issue: On Windows, a program that starts another program by a bare name could run a file of that name from the current directory. Starting a .bat or .cmd file with untrusted arguments could run other commands, and very long directory paths or process arguments could corrupt memory. Fixed in v0.2.70.
- Known issue: On Linux and macOS, building an untrusted project can run a program from that project when a tool the compiler starts (a linker, a C compiler or an LLVM tool) is not on
PATH, or whenPATHhas an empty,.or relative entry. Keep everyPATHentry absolute and the tools installed when you build code you do not trust, or update to v0.2.71. Fixed in v0.2.71.
Highlights
- Windows programs (W1c): sockets, processes, pipelines and crash reports.
- Sockets (b3e310e4): Winsock behind the same descriptors as Linux: socket, connect, bind, listen, accept, send/recv, sendto/recvfrom, shutdown, the name and option calls, fcntl, ioctl and poll over WSAPoll.
- Processes (c4a52e25): the standard library launches a process with one CreateProcessW call, with redirects, an environment and a directory; wait, kill, pipes and descriptor duplication work over handles.
- Pipelines (e65d586d): each stage is spawned with its pipe ends as standard streams; a group's stages share a process group, and killing the group ends them all.
- Crash reports (79be6969, 3a5d1b95): a vectored exception handler prints the same lines as Linux:
panic: stack overflow(status 101),fatal signal: a bad memory access at 0x…, or the exception code. A-gor--backtracebuild then prints the stack, unwound by the system's unwind tables. The process ends with the exception's code without Windows Error Reporting. CI checks this on a real Windows runner. - The compiler itself, built for Windows (c40a4ec1, 9fa734b3, f61de182, 55233353, 179a41a0, e0042d21, a4776d17, f6ddaf5d, 2f49a322, baca762e, 57f886f1). First steps toward a native
ablac.exe: built forx86_64-windows-hostedit finds its toolchain beside itself, gets the 128 MiB stack the Linux launcher gives the compiler, runs compile-time processes through the runtime's spawn (Windows has no fork or signals), and reads drive and UNC paths (Pathgives them back/-separated, and module identity keeps their root). Under Wine, with a stub LLVM, it prints--version, formats a file and takes a program through a build up to the first LLVM call (tools/test-windows-compiler.sh); the real LLVM for Windows is built from the patched fork with the static MSVC runtime (14bc8b85, 6ae80ced, 9176002a, f7b0215e) and is not linked in yet. Its JIT side is designed (docs/design/windows-jit.md):ablac.exeexports its external definitions for the JIT, and the runtime has the unwind-freeabla_setjmp/abla_longjmppair. Its entry, src/orc_windows_main.ab, links lld in process with no Linux C library, and a preflight checks the native Windows compiler link (6c3c9abf, db35c478). The verified Windows LLVM and lld static SDK is pinned (3a3f74d9, #1137). The runtime's C-library-named routines (memcpy,memset,__chkstkand the rest) are COFF weak externals, so the compiler can link against the static MSVC C runtime without a duplicate (db915574). - WASI commands (32acf5a6, d01b8b98, ae7bf58a).
ablac build app.ab --target wasm32-wasi -o app.wasmbuilds a WASI Preview 1 command that runs underwasmtime run app.wasm: no WASI libc or SDK, thewasi_snapshot_preview1ABI directly. Arguments, the environment, standard streams, the exit status, clocks and random bytes work, and files open through the working-directory preopen. Browser and hostless modules stay onwasm32-module(docs/targets.md). The browser playground runs WASI commands in a bounded Web Worker with a shared compiler stdlib bundle, and CI exercises both (71b8fec9, 79833ecf). - RISC-V 64 Linux programs (fa55c6c2).
--target riscv64-linuxbuilds libc-free RV64GC (LP64D) executables: static PIE start-up and thread-local storage, system calls byecall, threads, non-local jumps and signal stacks. CI runs hosted programs under QEMU and checks the Linux module programs in a job of their own. Raw RV64I object emission is unchanged. - Windows ARM64 programs (a318758a).
--target aarch64-windowscross-builds hosted, libc-free ARM64 Windows programs on Linux: ARM64 COFF linked into a console PE with the shared Windows runtime (stack probing, jumps, thread entry and native unwind data). CI runs the same images on a Windows 11 ARM runner (docs/targets.md). - The AArch64 static compiler runs on an empty PATH (4ec5efeb, 246f6b30, 61c90c11, 89d9f0e5, bdeba7bd, #1124). It now carries the real in-process shim (lld, llc, opt, the archiver and llvm-mc for its generated libc data file), linked against AArch64 LLVM and lld archives built to match the x86-64 ones, so it builds programs on an AArch64 Linux machine with no LLVM installed. CI and the release build it this way, and a qemu test builds hello on an empty PATH. AArch64 tests can also run on an SSH board pool (48688dbd), and the hardware lane can self-build the compiler on a board with an empty PATH, pass 2 equal to pass 3, and checks that programs it builds there behave as the cross builds (bdeba7bd, 9e0d9c0c, c0d5e7cf). LLVM, lld and the shim headers come from one pinned AArch64 set (5b0ae923).
- The collector traces arrays exactly and paces more steadily (fc359285). A boxed array's storage is traced up to the array's length, so stale slots past it no longer keep objects alive (serial, parallel and Wasm marking). Adaptive pacing moves its growth estimate a quarter of the way toward each new sample (a change over twofold resets it), which steadies the collection interval on cyclic workloads such as JSON.
- Compact object headers (f5b69a6b, 489ec33f, f582af18, 1864ef8d, 68951ca6). Small fixed-layout hosted objects carry a 16-byte header instead of 32 (a compact tree node: 64 native bytes plus an 8-byte registry slot, against 80 plus 8). Regions and frozen copies keep 32-byte headers.
- Faster code (85b1343b, def22dd6, 74732174).
- A counted loop that appends a fixed width each pass reserves its string builder once (fasta).
- Object allocation is passed the class's known size (c981ee71; binary-trees -1.8%).
- A guarded loop that copies a dense integer array element by element becomes a bulk copy (fd3b38ad; fannkuch).
- Linux release builds unroll short counted loop nests with literal bounds (nbody).
- Byte-buffer appends return as soon as a byte fits.
- Release builds promote the arguments of a recursive traversal of a private class with two self-calls (3e96c358).
- `--fast` builds link a prebuilt runtime (6409fa46, b7e15f51, d72e99c7, a5fa1587, d41ea3b8). Native x86-64 Linux
ablac build --fastcompiles the runtime once into an object cached per compiler, runtime sources and build options, and links it instead of compiling it into every program. Builds with compile-time code, the background collector, an explicit import of the runtime platform or an OpenSSL ABI module, or without a usable cache, use the ordinary runtime build.ABLA_FAST_RUNTIME_OBJECT=0opts out (docs/toolchain.md). - `--backtrace` works on Windows and macOS (6b8048bf, 1f9156af, b69a698f). As on Linux, a
--backtraceprogram is built with line tables and its DWARF is split out beside it:<output>.debugon Windows (named by a.gnu_debuglink),<output>.dSYMon macOS (tied by the image UUID). The program ships without debug info or symbols, andablac symbolizeturns its crash stack into file:line using the file beside it, including at an ASLR load address on Windows. docs/debugging.md now says--backtraceis opt-in at build time (there is no run-time switch) and what it costs. On macOS a release-gexecutable gets<output>.dSYMtoo (74326779). - The editor reanalyses less (d300af0a, 7f3f45f2, 3c20e28a, 199cf362). Verified replay is on by default: inserting an unused binding, or editing an existing unused integer binding, shifts the previous analysis instead of rechecking, after checking the inputs and output bytes match; the full checker remains the fallback. Assembling an analysis also does less duplicate work. Editing an integer result in an explicitly typed function is replayed too (62b58b1c).
- Indented JSON (63f1edf9, 7db6db5d, e3f03516).
jsonStringifyPretty(value, sortKeys = false, maxDepth = 128)writes a JSON tree with two-space indentation, optionally with object keys sorted, for stable files (docs/json.md). - Debugging (2d6e0b10). gdb and lldb show a value's words and an array's capacity as unsigned numbers (debuggers dropped them before), and universal values carry their Abla type name (
string?,Map). - Smaller collections stay serial (fa714c95). The automatic collection threads start only once a collection kept 32 MiB or needs the page directory, so small programs don't pay for parallel setup. A release program loads the STM runtime only if it may use it (071758db).
- Faster standard-library loading (accf21b5). The toolchain ships relocatable discovery records for the standard library, checked against the compiler and the exact source bytes, so a build skips rediscovering it.
Fixes
- A manifest's git source could inject git options (b2cd3790). A dependency's
gitsource or version selector inabla.tomlwas passed togit ls-remotechecked only for quotes and line breaks, so a value starting with-(such as--upload-pack=<command>) ran that command whenablac package updateresolved the dependency: anyone who cloned a repository and ran it executed what its manifest said.ablac build,runandtestwere not affected (they read only the lock, whose sources could not run a command). A source must now be an https, ssh, git or file URL, a path or an scp-style address, a selector a plain revision, tag or branch name, and a locked revision a full hash. Every git call clears the inherited git environment, turns off hooks and theexttransport, and passes the source, selector and revision after--. Fixed; every earlier release is affected. - Compile-time writes could follow a symbolic link out of the project (cdd4463f, #1142). The project bound for compile-time file access was checked on the path as written, so with
filesystem.writegranted, a write through a symbolic link inside the project (#path("../escape/x").writeText(...)withescape -> /elsewhere) landed outside it. The bound now resolves each existing component's symbolic links (at most 40) before the check, for the project root too, and the operation uses the resolved path. Fixed; every earlier release is affected. - Huge sizes no longer overwrite the heap (0cd3be0a, 4c01e72d, 6d90c5d9). A string built by repeating or doubling past 2^62 bytes no longer overwrites the heap: a length computation wrapped around, and the copy wrote past its allocation (for example
"x".repeat(n)with a largen). The same held forfilledArray(n, v)withnof 2^61 or more, aByteBufferpast 2^62 bytes, andappendFixedwith a huge decimal count. Each now panics instead. Fixed; every earlier release is affected. - A region can no longer store a value it built into a Map, a TVar or an outer ByteBuffer (411051ab, 94f20765). Inside
region { ... },outerMap.set(k, v),tvar.setValue(v)and extension functions that keep their argument in an outer receiver (such asouterBuffer.appendText(s)) compiled with a region-allocated value, and the outer container pointed at freed memory once the region was reset. They are now refused at compile time (region.escape:map.set,map.set.key,setValue), like array appends and field stores; docs/regions.md lists the rules. Fixed; every earlier release is affected. - JWT base64url is strict (92d82415). abla/jwt refuses padding and non-zero trailing bits, so a token has one spelling.
- A `$regex(...)` literal may start on the next line (0d5b07e5, f028667d). A token subparser that delegates an expression skips leading newlines, so
$regex(\n "pattern"\n)parses. - Subparsers under a module alias (36357f3c).
import "abla/json" as jthen$json {…}failed: the expansion named the library's helpers unqualified. Expansions of$json,$jsons,$jsonw,$regex,$xml,$sqland$htmlnow resolve them through the alias. - TLS (ded07e8a, 08ec787d). A session-ticket key now seals a bounded number of tickets and is then rotated (before, the default never rotated it, and AES-GCM's random 96-bit nonces made a collision, and so a forged ticket, possible on a busy server over time). A certificate verdict that carries an alert or a reason is a refusal (a custom verifier that refused with an empty reason was treated as accepting).
Toolchain and docs
- The compiler builds itself in less memory: IR blocks are reused when reachability prunes nothing (ce6fe0fc; self-compile 71.8 to 68.5 bytes per source byte). Collections under scoped GC stress no longer hand sweeps between threads (3569b55c).
- The same bytes from any directory, everywhere (ed35e6f8, 99193d01, #1090). A hosted Windows object built with
-g,--fastor--backtracenamed its temporary file in its CodeView, so two builds differed; it is now written under its published name, and Windows links run lld-link with one thread. tools/test-reproducible-paths.sh checks every file a build writes (release,--fast,-g,--backtrace, AArch64 and hosted Windows) from four directories, and the fuzzer's build-paths axis now requires byte-identical artifacts. - Crypto tests: Wycheproof ML-KEM-768, ECDSA with SHA-512 and P-384/SHA-256, and RSA decryption at 3072 and 4096 bits (8039ad56); ct-timing targets for P-384 signing and the RSA padding oracles, none of which leaks at 40,000 samples (be070445).
- `--warn-regex-construction` (57cfc60e):
W_REGEX_CONSTRUCTIONsuggests$regexforregexCompilecalls with a literal pattern. - BoGo's TLS shim builds again (e37b45d7), and
tools/gen-x509-limbo.shtakesBETTERTLS_STRIDE=1for the full 9,491-case run (34155de9). The packaged static compiler is tested linking Windows programs without external tools (68b3b165). - Exports test: a
git archiveexport is bounded like its checkout when the project names its root inabla.toml(b65edbcb, #1141; docs/compile-time.md). - Releases are signed from v0.2.67 (2769e59e, 5947d7ed, 30848b23, 28ef3984, 2858922e, 25dfd17f, 615e7d5d). The release workflow signs SHA256SUMS with the project's ed25519 key (
ssh-keygen -Y sign -n abla-release); the public key isrelease-signing.pubat the repository root. setup-abla,tools/bootstrap-compiler.shandtools/verify-release.shcheck the signature withssh-keygen -Y verifyand refuse an unsigned or altered asset for v0.2.67 and later (v0.2.66 and earlier have no signature). Each release also has an SBOM. The workflows also got tighter token permissions, and the static nightly, whose pinned action was not a real commit, starts again. docs/ci-security.md and docs/reproducibility.md say what is and is not proven. - Bounded GC-stress for the compiler (af62ddb0, #1128).
ABLA_COMPILER_GC_STRESS=ct|analysis|analysis-edit[:stride]stresses the compiler heap only around a threaded compile-time call or editor requests, and reports each window's collections on standard error.memorySetStressStride(n)collects at every n-th safe point under stress, andmemoryHeapStat(14)counts finished collections, serial or parallel. Two new lanes use them: tools/test-ct-threads-heap-stress.sh and tools/test-analysis-gc-stress.sh. - docs: the Linux toolchain archive is the static one from v0.2.66 (df2e81a7).
- Archive member names are tested with the per-push static compiler (f406f6a3).
- tools/test-static-compiler.sh gives both compilers the same sysroot for its LLVM text comparison (fac279e5).
Known issue
await task { ... }orawait thread { ... }, with the task or thread written directly afterawait, doesn't keep it alive while it runs: a garbage collection inside its body can free it, and the program crashes or uses freed memory. Until v0.2.77, bind the task or thread to avalfirst (val t = task { ... }; await t). Fixed in v0.2.77.- Reading a very long number as a floating-point value (
parseFloat, JSON'sasF64orreadNumber,strtod) takes time quadratic in its digits, so one request carrying a JSON number of about a megabyte can keep a server busy for minutes. Until v0.2.77, reject or truncate numbers longer than a few hundred digits before converting them, or keep request bodies small. Fixed in v0.2.77. - Ordinary code can write fields that the standard library's native buffers and cells rely on (
closedof aNativeByteBuffer,NativeI64CellorNativePointerCell), so safe code can reach memory it doesn't own. Until v0.2.79, don't write those fields outside the standard library, and check that your dependencies don't. Fixed in v0.2.79. - A dependency's prepared copy in
.abla/packages/is trusted by its marker files without checking its contents againstabla.lockin single-file builds, and in project builds that also have a vendored copy, so a changed copy (from a restored CI cache, or committed next to a reviewed lock) is built as is. Until v0.2.79, delete.abla/packages/before building when it may come from somewhere you don't control (it is fetched again and checked), and don't cache or commit it. Fixed in v0.2.79. - The HTTP clients (
HttpClient.send,HttpAsyncClient, and the WebSocket TLS client's upgrade request) write the method, path and header values they are given without checking them, so a line break in a value that came from user input can add headers or a second request. Until v0.2.79, percent-encode user input in paths and queries (percentEncode) and refuse CR, LF and other control bytes in header values before passing them to a client. Fixed in v0.2.79. - The static Linux compiler's own hardening was weaker than a glibc build's: its stack-protector canary was a fixed value on AArch64, its
_FORTIFY_SOURCEbuffer checks did nothing, andrealpathcould overrun its caller's buffer with a very deep working directory plus a long relative path. None of these is reachable alone; each makes a separate overflow bug in LLVM or lld easier to exploit when compiling code you don't trust. On AArch64 itsprintffamily also read arguments from the wrong place, so text that LLVM formats could show stack contents or crash the compiler. Until v0.2.79, on x86-64 Linux the dynamic compiler asset (ablac-dynamic-x86_64-linux, built on glibc) avoids them; elsewhere, build code you don't trust from a shallow directory. Fixed in v0.2.79.