Skip to content

Docs/Reference/Feature Status

Feature Status

A map of what works today, what is partial, and what is still planned.

~8 min read

On this page

This page describes fid, the self-hosted compiler, on the main branch as of Nov 15, 2026. The v0.8.0-unstable installer was built on Nov 10, so anything dated after that is on the main branch only; the stable v1.0.0 release is planned for December. The language is what fid accepts: the language reference documents every rule with the compiler function that implements it.

Working today

Core language: functions, closures, structs, enums with payloads, impl blocks, pattern matching with guards and ranges (exhaustive for enums, generic enums such as Option<T>, and bool; a guarded arm covers nothing), traits via cap (default methods, supertraits, associated types, trait objects with dyn), ? error propagation, defer (runs at function exit), if and match as values (also as a function’s last statement), f-strings, tuple destructuring, Box<T>, Rc / Arc, const generics, default and named arguments, @derive(Debug, Clone, Serialize, Deserialize, Default, PartialEq), @repr(C) and @packed layouts, inline assembly (asm!, encoded by the native Windows backend only).

Generics: monomorphized; type arguments inferred at each call, or a compile error naming the parameter; bounds checked at the call, including T: A + B; turbofish f::<T>(args) with its argument count checked; generic enums and generic impl blocks typed per receiver; Option<T> and Result<T, E> keep their payload type (f64, str, structs). Literals of generic structs of your own (Pair { first: 1, second: "a" }) work on main since Nov 15; the v0.8.0 installer rejects them.

Conditional compilation: @cfg(windows), @cfg(linux), @cfg(macos), @cfg(platform = "..."), @cfg(os = "..."), arch, debug and release keep or drop functions and structs. The platform is the host’s; release is always on and debug off.

Equality: == compares strings, structs, enums and Vecs of numbers or strings by content.

Memory: no GC. A variable owns its value and the value is dropped at the end of its scope; keeping a value takes an owner, and parameters are borrowed. Strings, Vec buffers and Boxes are reference-counted, so var b = a on a Vec, str or HashMap gives an independent value (the data is shared until the first write), and copying a struct separates its Vec fields. Collections declared in a region are freed at its end. fid run --leaks reports anything never freed.

Borrow checking: on by default (--borrowck=on|warn|off). A borrow ends at its last use; &s.x and &s.y can coexist. Rejected: &mut x while x is borrowed, changing a struct field while the struct is borrowed, changing a Vec while a for loop walks it. Trait impl bodies and &v[i] are checked too. References are second-class: they cannot be stored, returned from a local or sent to another thread.

Strings: str is owned, &str borrowed. A str field of a @scoped struct reads as &str: it can be read, compared, printed, joined with + and passed to &str parameters, but not returned as str or stored; str_clone(s) makes an owned copy. A @scoped struct cannot be stored or sent. http_serve_scoped uses this to free each request’s memory after its response.

Collections: Vec<T> and HashMap<K, V> with built-in methods. HashMap keys can be strings or integers (two specific 64-bit values are reserved and panic).

Run-time checks: bounds, integer overflow at the declared width, division by zero and double frees panic in every build. Raw pointers, raw allocation and C calls need an unsafe { } block; fid audit lists every one a program reaches.

Capability security: use mod with { IO, Net } grants. Once any import has a grant, calls to the known IO, FS, Net, Spawn and Alloc functions need the capability; sandbox { } revokes all of them. Calls are matched by name and the check does not follow calls into other functions, so coverage is partial.

Effects and handlers: !IO, !Net, !Spawn, !Alloc, !{} annotations with whole-program inference; under-declaring is a compile error. File, socket, process and clock runtime calls count as IO or Net. A function that takes a function value gets the effects of the function passed at each call site. Resumable handlers: do Effect.op(args) runs the handler, resume(cont, value) continues. See Errors & Effects.

Concurrency: spawn on OS threads, with every argument of the spawned call required to be @send (references and raw pointers are not); spawn scope { } joins every task; cancellation; bounded channels; select; parallel { | } runs x = f(...) branches and branches that read only word-sized locals on threads; mutex, rwlock and atomics (stdlib/sync.fd; every atomic runs sequentially consistent); green-thread tasks in stdlib/task.fd; async fn / await in the interpreter, through C and in native executables, including f64 and struct arguments (the interpreter runs an async body to its end at the call). See Concurrency.

Safety annotations: 17 rules, each with a test the compiler must reject: @no-alloc (also method calls such as .push(), Vec::new() and string +), @no-recursion, @no-unbounded, @no-panic / @crashfree, @no-indirect (also calls through function parameters), @requires-audit, transitive calls, @firmware (no OS runtime calls), @gas(N) (counts literal loop trip counts), @bounded-stack, @deterministic, @tainted (on parameters), @secret, @constant_time (source-level), sandbox, @send, and the borrow rules. Also @linear, @conserve, @audit, @medical, @realtime, @sensitive, @zeroize, @wrapping, given contracts, txn { }. fid qualify writes the rules, their tests and the program’s annotations as JSON, marked NOT_QUALIFIED. See Safety Annotations.

Comptime: comptime blocks, comptime fn, reflection (type_name, field_names, enum_variants, struct_size, …), comptime gen { }, loop unrolling.

Standard library: 169 modules (~70K lines), see Standard Library.

Compiler: fid is written in Fid (72 modules, ~210K lines) and is the release compiler. It builds itself through C to a byte-identical fixpoint (stage 2 == stage 3), checked on every release build; the last three-stage run was on Nov 8 (67 MB of C), and later changes were checked on one-stage builds. Compiling itself to C takes about 40 s with the compiler built at -O2 (Nov 15; about 133 s on Nov 6). fidesc, the earlier compiler in Rust, is frozen: it builds stage 1 and runs the test harness, and checks less than fid.

Toolchain: interpreter; C backend; native Windows executables (fid emit, with an IR optimizer and a linear-scan register allocator); static Linux executables for x86-64, ARM64 and RISC-V (fid emit --target, partly tested); LSP server with a VS Code extension; formatter, linter (fid lint --perf adds loop-hazard warnings), fid test, benchmarker, profiler; fid audit, fid qualify, fid explain, --leaks and --checked-alloc; a build cache in .fidcache/; extern "C" link "x.dll" imports; companion tools ark, scribe, veil. See Backends for platforms.

Test suite: the last full run was on Nov 2, 2026, with fidesc as the compiler under test: interpreter 339/339, C 343/343, native 345/345, and 89/89 programs that must be rejected were rejected. It has not been rerun with fid; later features were checked with their own tests on the interpreter, C and native backends. On the native Linux targets, 272 (x86-64), 273 (ARM64) and 271 (RISC-V) of 317 suite programs matched the interpreter on Nov 9. tests/conformance/ holds 104 programs, each checking one rule of the language reference. CI builds both compilers on Linux and Windows and runs a smoke test and the leak gate; the full suite runs before a release.

Partial

FeatureStatus
Value semanticsAssignment gives an independent value. A Vec, HashMap or str passed to a spawned call is still shared with the caller, and writes to it from both threads are not detected.
Native Windowsfid emit works on Windows x64, including async/await (fixed Nov 9). The full suite has not been run with fid emit, and generated code is slower than through C: fib(40) took 1.34 s native, 0.81 s through C and 0.53 s in Rust (Nov 2).
Native Linuxfid emit --target x86_64-linux, aarch64-linux or riscv64-linux writes a static ELF executable with no C compiler or linker. About 272 of 317 suite programs match the interpreter (Nov 9; ARM64 and RISC-V under QEMU).
Other targetsmacOS: through C with zig cc (builds; not run on a Mac), and native Mach-O executables are written but not yet run. WebAssembly: fid wasm modules validate and run under WASI (316 of 344 suite programs, Nov 15). Bare metal: emit --bare writes an x86-64 Multiboot kernel that boots under QEMU (10 of 10 bare tests). SPIR-V output does not validate. build --native (the old PIR path) crashes.
Watch modefidesc watch rebuilds and restarts on Linux only; fid watch is not implemented.
Constant-time checksfid checks the source only. The frozen fidesc also scans final x86-64 code on its Linux ELF path.
Native thread allocatorPer-thread free lists in the native runtime and per-thread arenas in the C runtime; no multi-thread stress test has been run.

Written, not run yet

  • fid emit --checked-alloc: every block on pages of its own, ending at a guard page.
  • scripts/sanitize.sh: the tests through C under ASan and UBSan (needs clang with ASan).
  • A nightly fuzzing script (scripts/fuzz/nightly.sh); no CI workflow schedules it.

Planned

  • Checks: a full suite run with fid as the compiler under test, and race checks for collections shared with a spawned call.
  • Speed: Vec elements stored at their real size, faster generated code, a faster self-compile.
  • Platforms: macOS output run on a Mac, and the whole suite on the native Linux targets.
  • Also queued: method-level type parameters, the ark package registry, debug info for gdb/lldb.

Good to know: the authoritative matrix is docs/reference/features.md in the repository. When this page and the repository disagree, trust the repository.

Report an issue