Target compatibility
Faber is one language with many compilation contracts. This page is the measured lowerability matrix: for each corpus term, which targets can lower it, and at what support level.
Policy verbs (support / erase / warn / reject / defer) and pipeline routing live on Compiling and targets. This page is the large scannable row list — HIR application-lane targets and MIR systems-lane targets side by side in the tables below.
Live CLI summary: faber targets.
About the term column. The term column below is the English reader spelling — the same words you write in Faber source on this site. Each term's identity in the compiler's corpus directory keeps its Latin key: that key is what the measurement rows are indexed and joined under, so a row is the same row whichever language you read the site in.
Rendered: unknown by faber/scripta/render-matrices.py from radix measurement JSON — do not hand-edit.
Measurement: emit_hir_target_matrix + emit_mir_target_matrix (in-process, no external toolchains).
Join: corpus/index.toml terms → exempla.
This is the official generated grammar×target support matrix. It reports lowerability — can target X lower grammar production Y — across every term in the exempla corpus. Runtime semantics (erase/warn/defer policy verbs), per-target contracts, and pipeline routing live in Compiling and targets, which links here for the rows.
Legend#
| Glyph | Meaning |
|---|---|
| ✓ | fully supported — all analyzable exempla for the term lower |
| ◐ | partial — some exempla lower, some have a measured gap |
| ○ | planned — not yet lowering; curated overlay (scripta/ebnf-matrix-overrides.toml) |
| ✕ | not supported — no exempla lower; default-truth, measured gap is real |
| — | not measured — no analyzable exempla for this term on this lane |
A ✓ means the corpus exempla exercising this term lower to the target. It does not guarantee identical runtime semantics. Some targets erase or warn on certain constructs (e.g. Go erases borrow modes
ref/mut/from) — those still render ✓ here because they lower. See the policy doc for that nuance.
Corpus-wide summary (all registered terms)#
How to read these percentages#
This matrix answers one narrow question:
For each general-language corpus term, does the named emit target lower the term's exempla?
It is not a product completion score for Metal, CUDA, or GPU training.
- Application HIR percentages (Rust / Go / TS / Faber) are fair "how much of the language emits" scores for host-language projections.
- General MIR percentages (llvm-text, wasm, sexp, …) score ordinary systems IR emission over the same full corpus.
- Device-kernel emitters are not scored here.
metal-textandwgsl-textlower a device-safe kernel surface —kerneldeclarations and related GPU views — and deliberately nothing else: no packages, async, CLI, full control flow, or host libraries. Measuring them against all ~280 general-language terms answers a question that does not apply to them, so this matrix does not ask it. Their real support is the device kernel support summary below, and real device execution runs throughfaber run --device metal. - There is no `cuda` column. CUDA is not a text emit target. CUDA device
programs are produced on the NVVM → PTX path (staged with llvm-text /
MIR device emission) and run with
faber run --device cuda. Product GPU backends are Metal and CUDA; matrix columns track emit surfaces, not every host session.
For product policy (build/run/package, erase/reject, device backends), use
Compiling and targets and faber targets — not
these corpus rows as a quality score.
Application lane (HIR → emitted source languages)
| target | capable | analyzable | % |
|---|---|---|---|
| rust | 570 | 573 | 99% |
| go | 514 | 573 | 90% |
| ts | 573 | 573 | 100% |
| faber | 573 | 573 | 100% |
Systems lane (MIR → device/IR artifacts)
| target | capable | analyzable | % |
|---|---|---|---|
| llvm-text | 534 | 577 | 93% |
| wasm-text | 450 | 577 | 78% |
| wasm | 448 | 577 | 78% |
| sexp-struct | 528 | 577 | 92% |
| sexp | 524 | 577 | 91% |
| runner | 503 | 577 | 87% |
Device kernel support#
This section is the GPU product view, kept apart from the corpus % tables
below, which deliberately do not score device emitters. It states how the device
route is defined and what each device target emits. It carries no measurement;
faber targets reports what your binary supports.
How a device program runs#
A kernel is a function declared with kernel. A package carries a device program
when its manifest has a [device] section. faber run --device <device>
selects where it runs.
| Device | What it is |
|---|---|
reference | Plain sequential code on the MIR runner; the oracle device results are checked against |
cpu | Processor cores as a device: the same session and launch pipeline as metal and cuda, run by a multicore worker queue (--threads N, [device] threads) |
metal | Apple Metal |
cuda | NVIDIA CUDA |
auto | Resolve against the machine's probes; fails closed when none, or more than one, is admitted |
An explicit device request never silently falls back. It fails closed before
launch (E_BACKEND_UNAVAILABLE) when the device is not admitted on the machine,
and a package with no device program fails closed. Precedence is the command
line, then the manifest [device] device, then auto.
Device targets#
| Target | What it is |
|---|---|
metal-text | Metal Shading Language source for the device-safe kernel subset. Device execution is faber run --device metal; -t metal-text itself is emit-only |
llvm-text | LLVM text. Also the staging chain for CUDA device execution, faber run --device cuda; -t llvm-text itself is emit-only. There is no separate cuda target |
wgsl-text | WGSL compute-shader source for the device-safe subset, validated by an external naga. It is not a GPU launch or a package runtime |
Device execution is under active development. The corpus % tables on this page score whole-language terms against kernel-only emitters, so a low percentage on a device row is not a statement about the device route.
Where to read more#
| Page | What it covers |
|---|---|
| Device execution CLI | The command contract |
| Compiling · device execution | Emit versus run |