Learn Fid
Fid uses the keywords you already know (fn, val, var, const, match) and adds one new concept per feature: borrowed references, capabilities, effects, and comptime. This page is the order to read things in.
1. Run something in five minutes
- Playground: the Rust bootstrap
fidesccompiler, compiled to WebAssembly, in your browser. Nothing to install. Switch the output mode to see the tokens, the AST, the SSA IR, and inferred effects of your functions.fidescis frozen, so features new infid(generic bounds, turbofish,@cfg, borrowed strings, the newer safety checks) may not run there. - Install: the Windows installer or the one-liner, then the Quick Start: write, run, and natively build a first program.
2. The language, in reading order
- Syntax & Keywords: bindings, literals, f-strings.
- Types, Functions & Closures, Control Flow, Structs & Enums, Traits & Generics.
- Memory & Regions: why there are no lifetime annotations, owned and borrowed strings, and when values are freed.
- Errors & Effects:
Result,?, effect inference, and resumable handlers. - Capabilities: no ambient authority; what
use lib with { Net }means. - Safety Annotations:
@no-alloc,@crashfree,@constant_time,@secret, the 17 rules and their tests, andfid qualify. - Concurrency:
spawnand@send,spawn scope, cancellation,parallel, channels,select,async. - Comptime: compile-time code and reflection instead of macros.
- The language reference in the repository: every rule of the language, with the compiler function that implements it.
3. Learn from programs
- Examples: ten complete programs: a neural network forward pass, an HTTP server, a mini compiler, a JSON parser, a game loop, and two bare-metal LED blinkers.
- The compiler:
compiler/*.fdin the repository is about 210K lines of Fid you can read (72 modules), with a lexer, parser, type checker, borrow checker, optimiser, and code generators.
4. Coming from another language
- The comparison table: Fid lined up against C, C++, Rust, Go, Zig, and Mojo.
- Migration: the v1.0 keyword set for readers of older Fid code.
- Switching to Fid: the adoption path for a team: keep your C, migrate one module at a time.
5. The toolchain
CLI Reference for every command, Backends & Targets for platforms, Watch Mode for the edit-run loop, Editor Setup for the built-in language server and VS Code extension, and Tools for the overview.
Reference
Standard Library (169 modules) and Feature Status, the map of what works today.