Skip to content

Systems programming, rebuilt from first principles

v0.8.0-unstable · prerelease build · stable planned for December
Fid is a low-level language with compile-time borrow checks, capability grants and effect tracking, compiled by its own toolchain, natively or through C. The name is short for Fides, the Latin word for trust. No LLVM. No GC. No lifetime annotations.Open source under the MIT licence. Nothing to install and no account needed to try it.

Run
// val is immutable, var is mutable, const is compile-time.
fn main() {
    val name = "world";
    var total = 0;

    for i in 1..=100 {
        total += i;
    }

    println(f"Hello, {name}! total = {total}");
}
Output
Hello, world! total = 5050
git clone https://github.com/pledgeandgrow/fid && cd fid && cargo build --release && RELEASE=1 ./scripts/bootstrap.sh
Windowsv0.8.0 installer · 6.6 MB(unsigned, no checksum yet)macOS / Linux builds from source: needs git, Rust and a C compilerevery install path

What it catches

Three programs the compiler refuses

Real source and the message fid prints for it. No runtime, no test needed.

A loop cannot change what it walks

The borrow checker rejects the push: the loop would read past a resize.

borrow.fd
fn main() -> i64 {
    var v: Vec<i64> = Vec::new();
    v.push(1);
    for x in v {
        v.push(x);
    }
    return 0;
}
error: borrow error in main (line 5): cannot change v while a `for` loop iterates over it: the loop would read past a resize or skip elements.
    Fix: collect the changes in another Vec and apply them after the loop.
How this check works

A module only gets what you grant

logger was granted the filesystem, not IO, so its println is refused.

main.fd
use logger with { FS };

fn main() -> i64 {
    log_line("started");
    return 0;
}
error: Capability error: 'println()' requires 'IO' capability (not granted to module 'logger')
How this check works

A pure function stays pure

pure_sum declares no effects, and helper prints. The call graph gives it away.

effects.fd
fn helper() -> i64 {
    println("side effect");
    return 1;
}

fn pure_sum(a: i64, b: i64) -> i64 !{} {
    return a + b + helper();
}
error: Effect error: function 'pure_sum' has inferred effect '!IO' but only declared effects not including it
How this check works

Why Fid

Checks you would otherwise do by hand

Six things the compiler and toolchain do, each with its current limits stated.

Memory safety that costs you nothing

Borrow and escape rules are checked at compile time, including changes to a Vec while a for loop walks it; bounds, integer overflow and double frees are caught at run time, always. No lifetime annotations and no garbage collector: every value has one owner and is freed when its scope ends.

Security your auditors can read

Import a module with { IO } and the compiler rejects its calls to network or filesystem functions you did not grant. Your use lines become a map of what can touch what. The check matches calls by name, does not follow calls into other functions, and is still partial.

Concurrency with checks

Every argument of a spawned call must be @send, so references and raw pointers cannot cross threads. parallel { | a = f(x) | b = g(y) } runs branches on threads, spawn scope { } joins every task at the closing brace and cancel scope stops them. Effect handlers have resumable continuations: do performs the effect and the handler calls resume.

Metaprogramming without the priesthood

No macros. comptime blocks and functions are regular Fid code that runs at compile time, with reflection over types (field names, enum variants, sizes) and comptime gen for generated code. @cfg keeps or drops functions and structs per platform.

A toolchain without LLVM

fid emit encodes the machine code and writes the executable itself: no assembler, linker or C compiler. That covers Windows x64 and, partly tested, static Linux executables for x86-64, ARM64 and RISC-V. Every other target goes through C; macOS and WebAssembly are experimental.

Watch mode

fidesc watch, in the frozen Rust compiler, rebuilds on save, reports which functions changed, and runs the program again (Linux only). fid has no watch command yet.

The honest comparison

Line it up against what you use today

Every rating below comes from each language's own community discourse and from what the Fid compiler actually does today, not from a roadmap.

Memory safety

C
No: manual
C++
No: smart pointers help, UB stays
Rust
Yes: but borrow-checker fights
Go
Partial: GC-managed, with pauses
Zig
No: discipline only
Mojo
Partial: improving, not complete
Fid
Yes: borrow checker, no GC

Can the language stop use-after-free and data races at compile time, and catch overflow at run time? Fid uses a borrow checker and second-class references: no lifetime annotations, no GC. Every value has one owner and is freed when its scope ends.

Security model

C
No: ambient authority
C++
No: ambient authority
Rust
No: ambient authority
Go
No: ambient authority
Zig
No: ambient authority
Mojo
No: ambient authority
Fid
Partial: capability grants, partial

Can third-party code reach the filesystem or network without your say? In Fid, a module imported with `with { }` needs a grant for the IO, FS and Net functions it calls. The check matches calls by name and does not follow calls into other functions, so coverage is partial today.

Supply-chain defense

C
No:
C++
No:
Rust
No: any crate can do anything
Go
No: any module can do anything
Zig
No:
Mojo
No:
Fid
Partial: grants per import, partial

Grants on imports narrow what a dependency can call, and the use-block is the audit surface. Checks match known library functions, so coverage is partial today.

Show the other 7 rows

No GC, bare metal ready

C
Yes:
C++
Yes:
Rust
Yes:
Go
No: GC runtime required
Zig
Yes:
Mojo
Partial: AI-focused targets
Fid
Partial: no GC; bare metal experimental

No garbage collector and no VM. Bare-metal output is experimental in Fid: `fid emit --bare` writes an x86-64 Multiboot kernel that boots under QEMU.

Compile speed

C
Yes: fast
C++
No: template build times
Rust
No: slow on large crates
Go
Yes: fast
Zig
Partial: fast, comptime can crawl
Mojo
Partial: heavy compile stack
Fid
Partial: fast for small programs

Fid skips LLVM. The compiler (about 210K lines) compiles itself to C in about 40 s when built at -O2 (Nov 15); the frozen Rust bootstrap compiler is still about twice as fast.

Watch mode

C
No:
C++
Partial: third-party tools
Rust
Partial: cargo-watch
Go
Partial: air
Zig
No:
Mojo
No:
Fid
Partial: Linux, rebuild + restart

Rebuild and rerun on save. fidesc watch (the frozen Rust compiler) does it on Linux; fid has no watch command yet. Rust and Go have tools that do the same. None of these patch a running process.

Concurrency

C
No: manual threads
C++
Partial: threads and atomics by hand
Rust
Partial: async, with a learning curve
Go
Yes: goroutines
Zig
Partial: basic
Mojo
Partial: AI parallelism focus
Fid
Partial: threads, tasks, async

spawn on OS threads with @send checks on every argument, spawn scopes with cancellation, parallel branches on threads, channels and select, green-thread tasks in stdlib/task. async/await works in the interpreter, through C and in native executables; the interpreter runs an async body to its end at the call.

Metaprogramming

C
No: preprocessor
C++
Partial: templates + constexpr + macros
Rust
Partial: two macro systems
Go
No: minimal by design
Zig
Yes: comptime
Mojo
Yes: comptime-style
Fid
Yes: comptime + reflection

comptime runs ordinary Fid code at compile time, with type reflection: no macro dialect.

External toolchain

C
No: libc + assembler + linker
C++
No: the heaviest of all
Rust
No: LLVM + linker
Go
Yes: mostly self-contained
Zig
Partial: shrinking
Mojo
No: MLIR + LLVM
Fid
Partial: none on Windows, Linux

fid emit writes Windows executables and static Linux executables (x86-64, ARM64, RISC-V) itself: no assembler, linker or C compiler. The Linux targets are partly tested; everything else goes through C.

Time to productivity

C
Partial: weeks, then a career of care
C++
No: years to mastery
Rust
No: months
Go
Yes: days
Zig
Partial: weeks
Mojo
Partial: Python-familiar, very new
Fid
Yes: days, familiar keywords

v1.0 uses the industry-standard keyword set; the one new concept is the capability/effect pair.

Fid's optimizer is younger than LLVM's, and the 1.x releases are about depth, not new pillars. Everything marked ✓ works in the compiler today.

In practice

What it has been used for so far

Six areas where the standard library and the example programs already go. Each links to something you can run or read.

AI & Machine Learning

Tensors, SIMD, parallel primitives and INT8 quantization in the standard library, with tensor shapes checked at run time and an experimental SPIR-V backend for GPUs.

Embedded & IoT

Interrupt handlers, @firmware functions that cannot call the OS, and region budgets checked at compile time. Bare-metal output is experimental: fid emit --bare writes an x86-64 Multiboot kernel that boots under QEMU, and the native ARM64 and RISC-V backends target Linux, not bare boards.

Cloud & Web Backends

HTTP, JSON and regex in the stdlib, and single binaries that deploy as a file copy. http_serve_scoped frees each request after its response, and the compiler stops a handler from keeping the request strings. No GC pauses and no VM to warm up.

Operating Systems & Infrastructure

Kernels, drivers and allocators are target use cases: inline assembly (encoded by the native Windows backend), @repr(C) and @packed layouts, interrupt handlers, with every unsafe block listed by fid audit.

Gaming & Graphics

Vector, matrix and quaternion math with swizzles, plus game-loop, physics, ECS and rendering modules in the stdlib.

Compilers & Developer Tooling

Fid compiles itself: 72 modules and about 210K lines of Fid, rebuilt to byte-identical output on every release build. The examples gallery includes a mini compiler to start from.

Adoption

Switching is a project, not a rewrite

The riskiest thing about a new language is the migration story.

  • Keep your C and call it directly

    extern "C" interop means your existing libraries keep working from day one. Migrate module by module, not big-bang; every migrated module gets Fid's borrow, bounds and overflow checks and can sit behind a capability grant.

  • Your team already knows the syntax

    The v1.0 keywords are the industry standard set: fn, val, var, const, return, and type. There is exactly one new concept per feature and no macro dialect, so budget days for onboarding, not quarters.

  • Start with one bounded workload

    An internal tool, an audited payments path, a service with a clear boundary. Win there, then widen.

Dogfooding, on the record

Fid builds Fid

The compiler is about 210K lines of Fid compiling Fid. Every release build checks that it rebuilds itself to byte-identical output (67 MB of C at the last three-stage run, Nov 8). No LLVM.

main.fd
Lexer
tokens
Parser
AST
Checks
types, borrows, effects
Monomorphizer
generics
SSA IR
optimizer
fid run
Interpreter
no build step
fid ccompile
C backend
any C compiler
fid emit
Native emitter
writes PE and ELF itself
One front end and one IR, three ways out. No LLVM anywhere in the path.
shell: fid
# a normal program
$ fid run hello.fd
Hello, world! total = 5050

# native PE: no assembler, no linker, no C compiler
$ fid emit hello.fd -o hello.exe
Built native executable: hello.exe

# and the compiler itself: about 210K lines of Fid, built three times
$ RELEASE=1 ./scripts/bootstrap.sh
...
FIXPOINT OK: stage 2 and stage 3 emit identical C

Real fid output, abridged: the fixpoint check of scripts/bootstrap.sh, run on every release build.

Where it runs

Platforms, as tested

Three backends on every row: the interpreter, the C backend, and the native emitter that needs no other tool.

PlatformInterpreterThrough CNative
Windows x64SupportedSupportedSupported
Linux x64SupportedSupportedPartly tested
Linux ARM64Not availablePartly testedPartly tested
Linux RISC-VNot availablePartly testedPartly tested
macOSNot availableExperimentalExperimental
WebAssemblyNot availablePartly testedExperimental
Bare metal x86-64Not availableNot availableExperimental

Main branch, Nov 15, 2026. Details and test counts are on Backends and Targets.

A compiler written in itself

572
Test programs in tests/bootstrap
169
Stdlib modules
~210K
Lines of self-hosted compiler (72 modules)

FAQs

The questions your tech lead will ask

Honest answers about what Fid is, what works today, and what switching actually involves.

Who is behind Fid, and what is the licence?

Fid is open source under the MIT licence. It is developed at Pledge & Grow and has one maintainer today, Mehdi Berel. Design decisions, known bugs and the roadmap are public in the repository.

We use Rust. Why would we switch?

Keep Rust where it earns its keep. Fid has no lifetime annotations (references are second-class: they cannot be stored or returned from a local), adds capability grants, effect tracking and effect handlers, and has no macro dialect. It is younger and its generated code is slower. Pilot it on one tool and compare.

We use C or C++. Is the migration real?

It can be incremental. extern "C" interop lets Fid call your existing code directly, so you can migrate one module at a time while the rest of the system runs unchanged. Each migrated module gets bounds, overflow and borrow checks and can be imported with a capability grant; calls into C need unsafe and are not checked.

How is Fid different from Zig?

Fid shares comptime and explicit allocation with Zig. The difference is checking: Zig leaves memory safety to the engineer, while Fid checks borrows and reference escapes at compile time, checks bounds and overflow at run time, and adds the capability and effect systems on top.

Is Fid production-ready?

Not yet for most teams. The v1.0.0 stable release is planned for December; the v0.8.0 build on the releases page is an unstable prerelease. Supported: Windows x64 (interpreter, C, native) and Linux x64 (interpreter, C). Native Linux executables (x86-64, ARM64, RISC-V) are partly tested; macOS, WebAssembly and bare metal are experimental. The full test suite has not been rerun with the current compiler. See Feature Status, and pilot it on a bounded workload.

Why build a toolchain without LLVM?

Control. The IR carries Fid semantics (regions, effects, capabilities), and there is no external toolchain to pin. The trade-off is optimizer maturity: generated code is slower than what LLVM produces today.

Is there unsafe code?

Yes, and it is fenced. Raw pointers and C calls need an unsafe { } block, and fid audit lists every unsafe block a program reaches, dependencies included, so reviewers know exactly where the guarantees stop.

What does a low-risk adoption look like?

Three steps. First, one engineer runs the Quick Start and ports a small internal tool, which takes about an afternoon. Second, pick a bounded workload: an internal tool, a payments path, a service with a clear boundary. Third, wire it into your system over C interop and measure build times, binary size, and incident surface against the incumbent. Every step is reversible; none requires a rewrite.

Build fearless. 
Ship native.

Run your first Fid program in the browser in under a minute. Install it when you want native binaries.