Concept index
Every Axle keyword, type, annotation, and runtime guarantee on one page — with a link to the chapter that documents it. Use this when you know the concept name but don’t remember which section covers it.
Keywords and syntax
| Keyword / construct | Documented in |
|---|---|
let (mutable binding) | Language tour → Variables |
const (immutable binding) | Language tour → Variables |
fn (free function) | Language tour → Top-level declarations |
class / trait | Language tour → Top-level declarations · OOP recipe |
class Foo : Base, Trait (unified supertype list) | OOP recipe → Unified class header |
dyn Trait (explicit trait-object receiver) | OOP recipe → dyn Trait |
| Default trait method bodies | OOP recipe → Default method bodies |
impl Self (a type satisfies a single-method trait without declaring it) | OOP recipe → impl Self |
when T : Bound (conditional method group) | OOP recipe → when T : Bound · Generics and traits |
<T : A + B> generic bounds | Generics and traits → Generic bounds |
match (value pattern match, exhaustive) | Pattern matching · Language tour → Control flow |
Patterns (literal, binding, range, or, struct, enum, null, _, const, guard) | Pattern matching → The pattern kinds |
match type T (compile-time type switch) | Language tour → Control flow · Generics and traits → match type |
@derive(Eq, Ord, Hashable, ToString, Clone) | OOP recipe → @derive · Generics and traits → @derive |
=> (the arm arrow in match, impl Self, lambdas) | Language tour → Control flow |
(params) => expr (lambda / closure), (A) => R (its type) | Language tour → Lambdas |
enum (named integer tags, backing type, payloads, methods) | Enums · Language tour → Top-level declarations |
pub / pub(crate) / pub(file) / pub(derived) (visibility, on a field and a method; no marker = private) · readonly (member modifier) | Language tour → Visibility and member modifiers |
static field (one slot for the class, read Class::FIELD) · field : T = v on a class (initialiser) | Language tour → Visibility and member modifiers |
constructor / drop() (destructor) | Shared<T> → Destructors |
static fn (namespace-style method) | FFI → static fn |
:: (static / module access — Color::Red, Shared::wrap) | Language tour → Operators · Visibility and field modifiers |
struct (value semantics) | Language tour → Structs |
T { field } (field shorthand) · field : T = v (default) · ..base (spread) | Language tour → Structs |
f(name: value) (named argument) | Language tour → Naming arguments at the call site |
(A, B) tuple · t.0 element access | Language tour → Tuples |
let (a, b) = … (destructuring binding) | Language tour → Taking one apart |
(w: T, h: U) (named tuple positions) | Language tour → Naming the positions |
if / else if / while / do-while / for / match | Language tour → Control flow |
Operators + compound assigns (+= … ??= &&= \|\|=) | Language tour → Operators |
as (numeric cast) · is / !is (type test) | Language tour → Operators |
break / continue | Language tour → Control flow |
try / catch / finally / throw / ! (error set) / ? (propagate) | Language tour → Exceptions · Error handling |
exception (declare a throwable type) | Language tour → Exceptions · Error handling |
defer | Language tour → Deferred cleanup · Memory model → defer |
spawn / Task<T> / .join() / .isAlive() | Language tour → Concurrency · Multithreading |
async fn / Future<T> / await | Multithreading → Async functions |
await all / Async::all (join a Future<T>[]) | Multithreading → Joining a set of futures |
Async::sleep(ms) (cooperative delay) | Multithreading → Async world |
synchronized block | Conventions → Concurrency idioms · Concurrency primitives |
use (module import) | Language tour → Modules and imports · Conventions → Modules and use |
extern "C" fn (import a symbol) | FFI → extern “C” fn |
extern "C" fn … { … } (export a symbol) | Exporting to C |
extern "C" struct / class (C layout) | FFI → a layout you did not choose |
extern "C" (A, B) => R (thin C function pointer) | FFI → Callbacks |
extern "C" from "lib" { … } (grouped imports) | FFI → Grouping a file of bindings |
sizeof<T>() / offsetof(T, field) | FFI → Measuring it |
unsafe { ... } block | FFI → unsafe blocks |
new T(...) | Memory model |
new shared T(...) | Shared<T> → Allocating |
Parameter prefixes
| Prefix | Meaning | Where |
|---|---|---|
| (none — borrowed) | Borrowed reference; the borrow cannot escape the call | Memory model → Ownership keywords |
mut | Mutable in place; ownership stays with caller | Memory model → Ownership keywords |
own | Consumes the value; caller can’t use it after | Memory model → Ownership keywords |
Types
| Type | Documented in |
|---|---|
Primitives (i8–i64, u8–u64, f32/f64, bool, char, string, void) | Language tour → Primitive types |
T[N] (fixed-size array) | Language tour → Primitive types |
T[] (dynamic array) | Language tour → Primitive types · Collections recipe |
Shared<T> (refcounted) | Shared<T> reference counting |
Task<T> (spawn result) | Multithreading |
ptr<T> / ptr (raw pointers) | FFI → ptr |
(A, B) / (w: A, h: B) (tuple, optionally named) | Language tour → Tuples |
Vector types f32x8, i32x4, … | SIMD → Vector types |
T \| null (nullable) | Language tour → Nullable types · Shared<T> → Transitions |
?. (safe navigation — the guard written inline) | Language tour → Safe navigation |
Annotations
| Annotation | Effect | Where |
|---|---|---|
@vectorize / @vectorize(width: N) / @vectorize(disable) | Enable / pin / disable loop vectorisation | SIMD → Auto-vectorisation · Annotations |
@unroll(N) | Pin loop unroll factor | SIMD → @unroll · Annotations |
@link(symbol = "symbol") | Pin the C-side symbol when it differs from the Axle name — on an import or an export | FFI → extern “C” fn + @link(symbol = …) · Exporting → Choosing the symbol name |
@layout(packed) | Refuse the padding in an extern "C" record — a wire format or on-disk header | FFI → Measuring it |
@upsert("probe" \| "slot_read" \| "slot_write" \| "lookup" \| "insert") | Declare a container method’s part, so lookup-then-insert fuses to one probe | Loop and idiom rewrites → Upsert fusion |
@float(fast \| strict \| contract) | Per-function float semantics: allow reassociation, forbid it, or allow contraction only | Annotations → @float |
@heat(cold) | Mark a function cold — never inlined, sized for size rather than speed | Annotations → @heat |
@target(os = …, arch = …) | The declaration exists only on the listed targets | Projects → When only one declaration differs |
Memory tiers
| Tier | When the compiler picks it | Documented in |
|---|---|---|
| Stack | Provably non-escaping new T(...) | Memory model → Four tiers |
| Arena | Escapes its scope but not the function | Memory model → Four tiers |
| Heap (owned) | Escapes the function with a single owner | Memory model → Four tiers |
| Shared (opt-in) | You wrote new shared T(...) or the binding type is Shared<T> | Shared<T> |
| No allocation | An owned child provably living and dying with its parent is folded into it | Memory placement → The cheapest tier is no allocation at all |
SIMD operations
| Operation | Surface form | Where |
|---|---|---|
| Broadcast scalar to all lanes | Tx<L>.splat(v) | SIMD → Operations |
| Literal-list constructor | Tx<L>(v0, v1, …) | SIMD → Construction |
| Typed load / store | Tx<L>.load(buf, i) (producer) / v.store(buf, i) | SIMD → Operations |
| Fused multiply-add | a.fma(b, c) | SIMD → Operations |
| Horizontal reductions | v.sum() / v.max() / v.min() | SIMD → Operations |
| Masked blend | Tx<L>.select(mask, a, b) | SIMD → Operations |
| Lane permutation | v.shuffle(indices) | SIMD → Operations |
| Lane equality | a.eq(b) | SIMD → Operations |
| Lane ordering | a.lt(b) / a.gt(b) | SIMD → Operations |
| Movemask | v.movemask() | SIMD → Operations |
| Unsigned lanes | u8x16 / u32x4 … (umax / udiv semantics) | SIMD → Unsigned lanes |
| Vector arithmetic | a + b, a - b, a * b, a / b, a % b | SIMD → Operations |
| Vector bitwise and shifts | a & b, a \| b, a ^ b, ~a, v << n, v >> n, v >>> n | SIMD → Bitwise and shift operators |
Standard library — by topic
| Topic | Module(s) | Recipe |
|---|---|---|
| Lists / maps / sets | std/collections | Collections |
| Exception classes | std/lang | Error handling |
| Math + PRNG | std/numeric/math, std/numeric/random | Numeric and time |
| Time / date / sleep | std/time, std/time/datetime | Numeric and time |
| Strings, parsing, JSON, regex, hashing | std/text and submodules | Strings and text |
| File I/O, paths | std/io, std/io/path | Files and I/O |
| TCP / HTTP / DNS | std/net, std/net/dns | — |
| Process, env, sysinfo, args, log | std/sys and submodules | CLI tools and system |
| Locks / atomics / channels | std/concurrent | Concurrency primitives |
libc FFI helpers (sqrt, malloc, …) | std/ffi/libm, std/ffi/libc/mem | FFI |
Console typed I/O | std/lang | every recipe uses it |
Error code ranges
| Range | Concern | Where |
|---|---|---|
E0001–E0021 | Typing, shape, naming, arity, unreachable code | Reading compiler errors |
E0281–E0282 | Ownership declaration (mut never mutated, refcount op on non-Shared<T>) | Reading compiler errors |
E0293–E0294 | Bounds analysis | Reading compiler errors |
E0501–E0508 | Ownership flow lattice (use-after-move, refcount imbalance) | Reading compiler errors |
E0509–E0510 | Concurrency (spawn borrow, double join / await) | Reading compiler errors |
E0511 | Closeable local without close() | Reading compiler errors |
E0517 | for … of iterable that is neither a range nor an array | Reading compiler errors |
E0520–E0522 | (reserved, not emitted) Shared::wrap / Shared::try_unwrap transitions | Reading compiler errors |
E0526 | (reserved, not emitted) dynamic-array alias origin | Reading compiler errors |
E0740 | A reference field construction may leave unassigned, or a class with no constructor to assign it | Structs & value semantics |
E0743–E0744 | Struct { … } literal omitting a field, or naming one twice | Reading compiler errors |
E0745 | Argument label not matching the parameter at its position | Reading compiler errors |
E0747 | ..base of the wrong struct type | Reading compiler errors |
E0601 | Generic bound not satisfied at instantiation site | Generics and traits → bounds |
E0700–E0705 | Unimplemented features (async lambda, async { … } block, try-with-resources, nested type declarations) | Reading compiler errors |
E0707 | Raw-pointer op (deref / i64 ↔ ptr<T> cast) outside an unsafe { } block | FFI — unsafe blocks |
E0708 | getUnchecked / setUnchecked, or an unchecked word access, outside an unsafe { } block | FFI — unchecked array access |
E0763 | A word access whose buffer is not a byte-array variable or field | FFI — word access |
E0710–E0713 | spawn dispatch | Reading compiler errors |
E0719, E0721–E0726, E0728–E0729 | Concurrency verbs + async structural gates + handle portability | Reading compiler errors |
E0738–E0739 | Async::all / await all operand and arity | Multithreading → await all |
E0714–E0718 | SIMD method dispatch | SIMD → Errors |
Editor and tooling
| Topic | Where |
|---|---|
| VS Code extension — install, features, status bar, tasks | Editor support → VS Code |
| Customising semantic-token colours | Editor support → Customising colours |
Built-in editor snippets (fn, class, try, …) | Editor support → Snippets |
axle build / run / check / bench as one-click tasks | Editor support → Tasks |
Driving axle-lsp from non-VS-Code editors | Editor support → Other editors |
Compiler optimisations
These pages explain what the compiler does to your code without changing its observable behaviour — each lives next to the feature it backs:
| Optimisation | Where |
|---|---|
| The map of what the compiler optimises (and what it won’t) | Optimisations |
| Memory placement — the stack > arena > refcount > heap ladder | Memory placement |
| Field inlining and alignment packing — one allocation instead of two, no padding between fields | Memory placement → The cheapest tier is no allocation at all |
Counting a run’s allocations (--alloc-stats) | Memory placement → Counting what actually ran |
| Bounds-check elimination (between-variable + interprocedural) | Bounds-check elimination |
| Escape analysis (stack / arena promotion) | Escape analysis and promotion |
| Arithmetic strength reduction — constant/pow2 divide, hoisted divisor, guard elision | Arithmetic strength reduction |
memset / memcpy loop recognition, per-value range bounds elision, abs idiom, peepholes, dead-code elimination | Loop and idiom rewrites |
| Upsert fusion — a container’s lookup-then-insert collapsed to one probe | Loop and idiom rewrites → Upsert fusion |
| Inline decisions + tail-call detection | Inlining and tail calls · Inlining, tail calls, and whole-program merge |
| Whole-program merge (stdlib + hot runtime leaves into your module) | Runtime and stdlib inlining |
LLVM attributes / metadata the compiler stamps (noalias, !tbaa, !range, fast-math) | What the compiler tells LLVM |
Shared<T> header, atomic ordering, wrap / try_unwrap | Refcount and transitions |
throw / catch dispatch model | Exception dispatch |
| CPU-level multi-versioning for FMA / reductions | SIMD CPU dispatch |
See also
- Language tour — every surface form in one pass
- Pattern matching —
matchand every pattern kind in depth - Enums — variants, payloads, methods, trait implementation
- Generics and traits — the type-system surface
- Conventions — idiomatic Axle
- Recipes — patterns by task
referenceindexkeywordsglossary