Supported targets
A platform is in one of three states here, and the words mean this:
- supported — the toolchain builds, links, tests, and releases artifacts for the target;
- experimental — important pieces work, but production support is not yet promised;
- emission-only — LLVM can emit the object/module format, but the runtime/linker/deployment path is incomplete.
The website must never describe emission-only support as deployable platform support.
What is supported
Section titled “What is supported”Six toolchains, and they are exactly the ones the release workflow builds, packages, and then uses to compile a program before publishing:
| triple | state | |
|---|---|---|
x86_64-unknown-linux-gnu |
supported | on glibc 2.39 or newer — see below |
aarch64-unknown-linux-gnu |
supported | on glibc 2.39 or newer — Graviton, Ampere, arm64 containers |
x86_64-unknown-linux-musl |
supported | Alpine — see below |
aarch64-unknown-linux-musl |
supported | Alpine on arm64 |
x86_64-pc-windows-msvc |
supported | |
aarch64-apple-darwin |
supported |
A release is not published unless each of them has produced an artifact, unpacked it somewhere else, and built and run a program with it. That test is the reason this list is short: it is what has actually been done, not what is expected to work.
Every Linux toolchain also builds static executables for two targets, wherever it runs:
| triple | state | |
|---|---|---|
x86_64-unknown-linux-musl |
supported | khora build --target x86_64-unknown-linux-musl |
aarch64-unknown-linux-musl |
supported | khora build --target aarch64-unknown-linux-musl |
Static executables below says what one is and what it costs.
Everything else is out of scope for this release, which is a statement about what is promised rather than a prediction about what would happen if you tried:
- A glibc program from the Alpine toolchain (
--target x86_64-unknown-linux-gnuon Alpine). The link needs glibc’s start files and libraries, and an Alpine machine has none. - Windows on arm64, and Linux on arm64 from a Windows or macOS toolchain, are not built or tested.
- Cross-compiling a dynamically linked program —
aarch64-unknown-linux-gnufrom an x86-64 machine, or anything for Linux from a Mac — is not supported. The compiler can emit for another target, andKHORA_TARGETwill verify its code generation, but the link needs that target’s glibc and nothing supplies it. Static musl executables are the exception: either Linux toolchain builds them for either architecture. - WebAssembly, and Cloudflare Workers with it, are not a target of this release. See below.
Static executables (musl)
Section titled “Static executables (musl)”khora build --target <arch>-unknown-linux-musl links the program, the Khora
runtime and the musl C library into one statically linked executable. It has
no dynamic loader and needs no C library on the machine that runs it, so it
runs on any Linux kernel of that architecture: Alpine, a distroless static
image, or an empty scratch container — Containers
has a Dockerfile. It is a static PIE: position-independent, and relocated by
its own start code, so the kernel loads it at a random address as it does a
dynamically linked program.
What a build needs:
- A Linux toolchain. It carries the musl runtime and C library for both
architectures in its
targets/directory, so nothing is downloaded. - A C compiler driver, as for any build. For the machine’s own
architecture
clangorgccwill do. On Alpine,clangandlld: theclangpackage there has no linker of its own. - For the other architecture,
clangandld.lld(apt install clang lld): gcc cannot be told another target, and the system linker reads only its own machine’s objects. Without them the build stops and says which is missing.
What it costs and what it excludes:
- Size. Everything the program uses is inside it. A release hello world is about 9 MB static against about 10 MB dynamic; the runtime both carry is most of either.
- No
--lib. A shared library is loaded into a process that already has a C library, and a musl one inside a glibc process is two C libraries with different ideas of the same state. The build refuses and says so. - Name resolution is musl’s:
/etc/hosts, then the servers in/etc/resolv.conf. There is no NSS, so annsswitch.confmodule (LDAP, mDNS,systemd-resolvedover D-Bus) is not consulted. Docker writes both files into every container. - Outbound TLS verifies against the trust store at the usual paths, as
the dynamic build does. In an image with none —
scratch—client()raisesTlsError::BadCertificatebefore it connects; copy in a CA bundle (/etc/ssl/certs/ca-certificates.crt) or name one withSSL_CERT_FILE. - Other programs.
std::processruns programs that are in the image. Inscratchthere are none and no/bin/sh, sorun,outputandchecked_outputraiseProcessErrorfor anything not copied in, andshellalways does. A program that shells out needs a base that has the programs:gcr.io/distroless/staticplus them, orbusybox. - Native libraries in
[build] linkcome only from[build] link-search, aslib<name>.abuilt for musl. The machine’s own library directories are not searched — their archives are built against its glibc — and a name found nowhere stops the build saying so.m,pthread,dl,rtandutilare part of musl’s C library and need no file.
Fibers on both backends, sockets, TLS client and server, and the standard library’s own test suite run in a static build, and the release workflow builds and runs one with each packaged Linux toolchain before publishing.
The toolchain on Alpine
Section titled “The toolchain on Alpine”The *-unknown-linux-musl toolchains run on Alpine, and install.sh chooses
them there. The compiler is one statically linked executable: it needs no C
library, so it also starts on any other Linux of its architecture.
On Alpine, khora build with no --target builds a
static executable — that is the program an Alpine
machine can run with nothing installed, and the one a FROM alpine image
wants. khora check, test, run, fmt and the language server behave as on
any other platform.
What a build needs is clang and lld:
apk add clang lldAlpine’s clang package brings the driver and no linker; without lld (or
gcc’s binutils) the build stops and says to install it.
The compiler walks a program on a 512 MB stack on Alpine as everywhere else.
Measured with the release compiler on Alpine, a list literal of 100,000
elements checks and one of 2,000,000 does not: past the limit the compiler
stops with thread 'khora' has overflowed its stack and exit status 134,
which is what the glibc compiler does with the same file.
The Linux build needs glibc 2.39
Section titled “The Linux build needs glibc 2.39”Both Linux triples mean a recent one. The published Linux
toolchains are compiled on GitHub’s Ubuntu 24.04 runners, x86-64 and arm64,
and a glibc program carries the symbol versions of the machine that
built it. The published binary asks for GLIBC_2.39 and will not start against
anything older — not with a degraded feature, but with
libc.so.6: version 'GLIBC_2.39' not found on every command.
| distribution | glibc | the published toolchain |
|---|---|---|
| Ubuntu 24.04 LTS | 2.39 | runs |
| Debian 13 (trixie) | 2.41 | runs |
| Debian 12 (bookworm), current stable | 2.36 | does not run |
| Ubuntu 22.04 LTS | 2.35 | does not run |
| RHEL 9 and rebuilds | 2.34 | does not run |
| Alpine, and anything on musl | not glibc | runs the musl toolchain instead |
That table is the honest reading of the release rule at the bottom of this page, applied to a detail the rule did not previously ask about: what a fresh CI environment produced was tested on the environment that produced it. Debian stable and a supported Ubuntu LTS are on the wrong side of the line, so the requirement is stated here rather than discovered by somebody installing.
install.sh refuses before downloading on a system below the floor, and stops
with the error rather than reporting success if the unpacked binary cannot run
anyway. scripts/check-install.sh is what holds the release to that: it
installs from the published archive inside each of those images and checks that
the toolchain and the installer agree.
Raising the floor is a release-workflow change, not a documentation one. Building the Linux artifact on an older base image would lower the number; until that is done and checked, the number here is what the release actually is. What this page will not do is list a target as supported and leave the constraint that makes it unusable on half of today’s Linux machines to be found at runtime.
Nothing here applies to the programs you compile. A Khora executable links against the machine that built it, so its floor is that machine’s glibc — which is why Containers builds and runs in the same base image. A static executable has no floor.
The artifacts, and checking one
Section titled “The artifacts, and checking one”A published stable release provides one archive per triple and a checksum
beside it, named for the tag. These 0.4.0 URLs work only after the stable
release is published; for a published release candidate, replace both 0.4.0
strings with its full version, such as 0.4.0-rc.2:
https://github.com/codyspate/khoralang/releases/download/v0.4.0/khora-0.4.0-x86_64-unknown-linux-gnu.tar.gzhttps://github.com/codyspate/khoralang/releases/download/v0.4.0/khora-0.4.0-x86_64-unknown-linux-gnu.tar.gz.sha256install.sh and install.ps1 fetch exactly that pair and refuse the archive if
the digest does not match. To do it by hand — in a build image that should not
pipe a script into a shell, say:
version=0.4.0triple=x86_64-unknown-linux-gnubase=https://github.com/codyspate/khoralang/releases/download/v$versioncurl -fsSLO "$base/khora-$version-$triple.tar.gz"curl -fsSLO "$base/khora-$version-$triple.tar.gz.sha256"sha256sum -c "khora-$version-$triple.tar.gz.sha256"tar xzf "khora-$version-$triple.tar.gz" -C /opt/opt/khora-$version-$triple/bin/khora --versionWindows ships the same layout as a .zip rather than a .tar.gz.
The archive unpacks to khora-<version>-<triple>/ holding bin/khora, the
runtime archive beside it, std/ as source, the licenses, and targets/.
targets/ holds the WebAssembly runtime in every archive, and
in every Linux archive, glibc or musl, the runtime and musl C library for each
static target. Nothing needs
configuring after unpacking: the compiler finds std/ and the runtime beside
its own binary, and KHORA_STD and KHORA_RT_LIB exist only as overrides for
an unusual layout.
A release also carries khora-<version>.cdx.json, a CycloneDX bill of
materials for the toolchain itself, with its own checksum.
WebAssembly
Section titled “WebAssembly”WebAssembly is a distinct runtime environment, not Linux with a different object format. A wasm target must use a std/platform surface appropriate to its host and must not expose filesystem or socket APIs the host does not provide.
No wasm target is advertised. What exists is a WebAssembly library: khora build --lib --target wasm32-unknown-unknown produces a module that exports your pub extern fns and imports nothing. Every release archive carries the runtime it links, in targets/wasm32-unknown-unknown/, and the compiler finds it there. The link is done by wasm-ld, which the compiler looks for in the LLVM installation it was built against and then on PATH; it comes with LLVM’s lld (Homebrew’s lld@22 on macOS), and one on PATH must be LLVM 22’s. Without it the build fails, naming both places it looked. Inside the module, arrays, strings, loops, !, and regions with their finalizers work as they do natively, and the compiler’s own tests run such modules and check what they return. It has one thread of control: nothing can be canceled from inside the module, a long loop runs until the host stops it, and Fiber::spawn is not available. print and the text of a trap go nowhere — the module has no standard output or error, and imports nothing that could carry them — so return what the host needs to see. After a trap, discard the instance and make a new one rather than calling it again: the trapped call’s objects are never freed and its finalizers never run, so the instance that survives it is not in a state anything promises.
What is missing is everything a deployment needs. std has no Worker-shaped platform surface, and no host-provided networking or storage capabilities are modeled. That is the difference between a module that runs and a deployment path, and only the first exists.
A plugin is the other kind of WebAssembly module: khora build --plugin (target wasm32-khora-plugin) builds a library that a host program loads in a sandbox and grants files, environment variables, a memory cap and a deadline, one instance at a time. It is experimental: the build is tested, and a host exists as a Rust library but cannot yet be linked into a Khora program. Unlike a Worker module, a plugin imports the host’s functions, and print and a trap’s message reach the host. Plugins has the model and what the sandbox does not cover.
Cloudflare Workers is the motivating first wasm deployment target, and its host-provided networking model and single-threaded isolate mean its runtime contract will differ intentionally from native server targets. Cloudflare Workers says what would have to exist, and tells you not to choose it in the meantime.
Release rule
Section titled “Release rule”A target enters the supported table only when a fresh CI environment can produce the release artifact and a deployment/conformance test executes it in the environment users are being told to target.
Khora 0.4.0built fromee766ae43388on 2026-11-26 22:56ZVersioningSecurityContributingReleasesSource