
a systems programming language prioritizing verifiable correctness, determinism, and performance
General-purpose systems language and production toolchain with a memory-safe-by-default shipped safe-language surface, verifiable correctness, deterministic execution, and replay-first debugging built in.
fzy ships one production CLI, fz, for both compiler workflows and deterministic validation. Correctness, determinism, replay, incident artifacts, and production evidence are part of the normal workflow rather than an afterthought. For a quick visual tour of the language, open the shipped FZL showcase in your browser with open fzl-showcase.html. For the short argument for why you might pick it, see WHYFZY.md.
Repository architecture policy is typed internally and JSON at real boundaries only.
INSTALL.mdUSAGE.mdWHYFZY.mdCODE.mddocs/production-workflow-v1.mddocs/gpu-v1.mddocs/system-safety-trust-model-v1.mddocs/unsafe-contract-authoring-v1.mddocs/language-stability-v1.mddocs/workspace-policy-v1.mddocs/operational-insights-v1.mdfzyllm: saint0x/fzyllmRecommended install:
curl -fsSL https://raw.githubusercontent.com/saint0x/fzy/main/install.sh | sh
That installs fz to ~/.local/bin, updates PATH if needed, and verifies the install with fz version and fz env.
Source fallback:
curl -fsSL https://raw.githubusercontent.com/saint0x/fzy/main/install.sh | sh -s -- --from-source
Want the fastest overview? Open fzl-showcase.html with open fzl-showcase.html, skim WHYFZY.md for the product argument, then use the sample below as a compact executable sketch.
use core.log;
use core.path;
use core.process;
use core.time;
enum Mode {
Fast,
Safe,
}
trait Scorer {
fn score(endpoint: Url) -> i32;
}
struct HttpScorer {}
impl Scorer for HttpScorer {
fn score(endpoint: Url) -> i32 {
discard endpoint;
return 7;
}
}
struct Config<TEndpoint> {
retries: i32,
endpoint: TEndpoint,
mode: Mode,
}
fn weight(mode: Mode) -> i32 {
match mode {
Mode::Fast => return 3,
Mode::Safe => return 1,
_ => return 1,
}
}
async fn boost(v: i32) -> i32 {
checkpoint()
return v + 1
}
fn normalize<T: Scorer>(cfg: Config<Url>) -> i32 {
return weight(cfg.mode) + T.score(cfg.endpoint)
}
async fn run_once(cfg: Config<Url>) -> i32 {
let base = normalize<HttpScorer>(cfg)
return await boost(base)
}
fn main() -> i32 {
let cfg = Config { retries: 4, endpoint: url.parse("https://example.test"), mode: Mode::Fast }
let now = time.now()
let out_path = path.join("tmp", "score.log")
let mode = process.argv_or(1, "showcase")
let score = normalize<HttpScorer>(cfg)
log.info("snippet.run", out_path)
discard mode
discard run_once
if score + now > 0 then return score
return score
}
For broader language coverage, use CODE.md, examples/, and the browser-friendly FZL showcase.
Framework packages follow normal package rules: declare them in fozzy.toml under [deps], then import them in source with use fzbounds;, use fzweb;, and similar package names. Direct source checks such as fz check src/services/mod.fzy --json now validate through the owning package context, so dependency imports and sibling modules behave the same way they do in full-project checks.
fz: compiler CLI for build, run, test, verify, docs, IR, RPC, headers, ABI checks, and morefz fmt, fz doc gencrates/parser, crates/ast, crates/hir, crates/fircrates/verifiercrates/runtimecrates/drivertests/*.fozzy.jsonImplemented and validated today:
alloc(...) / free(...)defer semantics across normal code and unsafe { ... } islands, so deterministic cleanup is enforced rather than merely documentedalloc(...) / free(...) flows and verifier-visible lifecycle checksfifo, random, coverage_guidedrpc_send, rpc_recv, , fzy is set up to support these production claims today:
alloc(...) / free(...) stay in safe code when the compiler can still verify ownership, provenance, and cleanup executionfzweb plus security primitives that keep session/cookie/auth flows inside the supported runtime surfaceSee also:
docs/system-safety-trust-model-v1.mddocs/production-memory-model-v1.mddocs/production-workflow-v1.mdcargo check --workspace
cargo test --workspace
# Scaffold a project in the current directory or a target path
fz init [path] [--name package] [--template minimal|rust|ts] [--with run,fuzz,explore,memory,host|all] [--force]
# Build source/project
fz build [path] [--release] [--lib] [--threads N] [--backend llvm|cranelift] [--pgo-generate|--pgo-use file] [-l lib] [-L path] [-framework name] [--json]
# Run source/project or .fozzy scenario
fz run [path] [--det] [--strict-verify] [--seed N] [--record path] [--host-backends] [--backend llvm|cranelift] [--max-seconds N] [--exit-on-healthcheck URL] [--smoke-http URL] [-- <args>] [--json]
# Test source/project or .fozzy scenario
fz test [path] [--det] [--strict-verify] [--sched fifo|random|coverage_guided] [--seed N] [--record path] [--backend llvm|cranelift] [--filter substring] [--json]
# Verify/check/docs/tooling
fz fmt [path ...] [--check] [--json]
fz check [path] [--json]
fz verify [path] [--json]
fz lint [path] [--tier production|pedantic|compat] [--json]
fz dx-check [project] [--strict] [--json]
fz spec-check [--json]
fz emit-ir [path] [--json]
fz perf [--artifact artifacts/bench_core_rust_vs_fzy.json] [--json]
fz stability-dashboard [--json]
fz parity [path] [--seed N] [--json]
fz audit unsafe [path] [--workspace] [--json]
fz vendor [project] [--json]
fz abi-check <current.abi.json> --baseline <baseline.abi.json> [--json]
fz debug-check [path] [--json]
fz pgo merge [path] [--out file] [--json]
fz lsp diagnostics [path] [--json]
fz lsp definition <path> <symbol> [--json]
fz lsp hover <path> <symbol> [--json]
fz lsp rename <path> <from> <to> [--json]
fz lsp smoke [path] [--json]
fz lsp serve [--path <workspace>] [--json]
fz map suites [--root dir] [--scenario-root dir] [--profile pedantic|production|compat] [--json]
fz artifacts ls latest [--json]
fz report show latest [--format json|text] [--json]
fz usage [--json]
fz env [--json]
fz version [--json]
fz inspect stdlib <module> [--json]
fz schema [--json]
fz validate <scenario> [--json]
fz trace verify <trace> [--strict] [--json]
fz replay <trace> [--json]
fz shrink <trace> [--json]
fz ci <trace> [--json]
fz trace-native <trace.fozzy> [--out path] [--json]
# FFI / RPC / docs outputs
fz headers [path] [--out path] [--json]
fz rpc gen [path] [--out-dir dir] [--json]
fz doc gen [path] [--format json|html|markdown] [--out path] [--reference path] [--json]
VS Code integration lives in tooling/vscode and targets fz lsp serve.
Runtime defaults and surfaced behavior:
127.0.0.18787listen.env or FZ_DOTENV_PATH is loaded once before env/HTTP operationslog.set_json(1)core.process, core.term, core.thread, core.log, core.text, core.io, core.path, and core.utilWith fz test <file.fzy> --det --record artifacts/name.trace.json --json, the driver emits:
*.trace.json: deterministic execution trace*.timeline.json: schedule decisions*.report.json: summary, findings, and failure grouping*.explore.json: schedule candidates and scenario priorities*.shrink.json: deterministic shrink hints*.scenarios/ and *.scenarios.json: generated language-native scenarios*.manifest.json: artifact map including the primary scenario pathCanonical authoring split:
core.process, core.term, core.text: argv and terminal UXcore.log: logging policy and structured outputcore.io, core.path: filesystem discovery and path assemblyproc.*: child-process executionExample:
use core.log;
use core.process;
use core.term;
use core.text;
fn main() -> i32 {
let mode = process.argv_or(1, "serve")
discard log.set_sink_name("stderr")
discard log.set_level_name("warn")
discard term.transcript_kv("mode", mode, 8)
if term.is_interactive() == 1 {
discard term.eprint_line(str.concat("interactive=", str.from_i32(term.is_interactive())))
}
discard term.print_line(text.indent("ready\nwaiting", " "))
return 0
}
EOF is explicit:
term.read_line() == "" and term.stdin_eof() == 0term.read_line() == "" and term.stdin_eof() == 1For serious CLI/runtime work, use both the compiler-integrated launcher and the built binary when exact terminal behavior matters.
cranelift and llvm--backend, then FZ_NATIVE_BACKEND, then profile defaultdev -> cranelift, release -> llvmfozzy.lock drift checks for path dependenciesfz vendor [project] --jsonfozzy.lock and vendor/fozzy-vendor.jsondocs/dependency-locking-v1.mdfz abi-check enforces:
Additive exports are allowed.
docs/c-interop-production-v1.mdpubext c fn requires #[ffi_panic(abort|error)]ext unsafe c fn for unsafe C imports and call them only inside unsafe { ... }fz build --lib emits static/shared libraries plus an installable header and ABI manifest
--backend llvm is rejected with a migration hintunsafe fn and unsafe { ... }fz audit unsafe --workspace --json emits .fz/unsafe-map.workspace.json, .fz/unsafe-docs.workspace.json, .fz/unsafe-docs.workspace.md, and .fz/unsafe-docs.workspace.htmlreason, invariant, owner, scope, risk_class, and proof_ref are compiler-generated and policy-drivenUse this sequence for strict confidence:
# 1) Determinism audit first
fz doctor --deep --scenario tests/run.pass.fozzy.json --runs 5 --seed 42 --json
# 2) Strict deterministic tests
fz test --det --strict-verify tests/run.pass.fozzy.json tests/memory.pass.fozzy.json --json
# 3) Record one real trace
fz run tests/run.pass.fozzy.json --det --record artifacts/trace.fozzy --json
# 4) Validate replay pipeline
fz trace verify artifacts/trace.fozzy --strict --json
fz replay artifacts/trace.fozzy --json
fz ci artifacts/trace.fozzy --json
# 5) Host-backed confidence pass
fz run tests/host.pass.fozzy.json --host-backends --json
Strict release gate:
./scripts/ship_release_gate.sh
This includes release-blocking docs claim-integrity checks via scripts/safety_claim_integrity_gate.py.
cat >/tmp/demo.fzy <<'FZY'
test "alpha" {}
test "beta" nondet {}
rpc Ping(req: PingReq) -> PingRes;
async fn worker() -> i32 {}
fn main() -> i32 {
timeout(1)
return 0
}
FZY
fz test /tmp/demo.fzy --det --sched random --seed 13 --record artifacts/demo.trace.json --json
Inspect the emitted native test artifacts directly:
artifacts/demo.trace.native.trace.jsonartifacts/demo.trace.report.jsonartifacts/demo.trace.timeline.json when rich artifacts are enabledartifacts/demo.trace.manifest.jsonNative test manifests are first-class trace verify / replay / ci inputs for recorded native test runs. They are not scenario inputs and do not participate in scenario shrink.
All shipped examples follow the v1 narrative DX convention:
src/main.fzy is orchestration-only and places fn main lastsrc/tests/*mod.fzyAvailable projects:
examples/agent_runtimeexamples/context_runtimeexamples/minimal_runtimeexamples/service_appexamples/fullstackexamples/robust_cliexamples/live_serverValidation and project flows:
fz dx-check examples/fullstack --strict --json
fz check examples/fullstack --json
fz build examples/fullstack --backend cranelift --json
fz build examples/fullstack --release --backend llvm --json
fz run examples/fullstack --backend cranelift --json
fz test examples/fullstack --det --seed 41 --backend llvm --json
fz headers examples/fullstack --json
fz abi-check examples/fullstack/include/fullstack.abi.json --baseline examples/fullstack/include/fullstack.abi.json --json
fz dx-check examples/robust_cli --strict --json
fz build examples/robust_cli --backend cranelift --json
fz run examples/robust_cli --backend llvm --json
fz test examples/robust_cli --det --seed 55 --backend cranelift --json
fz dx-check examples/live_server --strict --json
fz build examples/live_server --backend cranelift --json
fz run examples/live_server --backend llvm --json
fz test examples/live_server --det --seed 77 --backend cranelift --record artifacts/live_server.stats.trace.json --rich-artifacts --json
fz run tests/live.server.interhttp.fozzy.json --host-backends --json
If you are contributing from a checkout instead of installing a release build, use cargo run -q -p fz -- <args> as a source-only fallback.
Keep these versioned delivery documents updated during implementation:
PLAN.mdFEATURES-TO-SHIP.mdrpc_deadlinerpc_canceltest blocksmod declarationspubext c fn signaturesfz rpc gencore.crypto and core.security, including secure random, hashing, HMAC, constant-time compare, and URL-safe encodingsfzweb production web framework modules for app routing, cookies, sessions, multipart uploads, persistence, SSE, websockets, and OpenAPI exportfz run executes native output directly with live text streaming or JSON capturepython3 scripts/direct_memory_architecture_gate.pypython3 scripts/direct_memory_perf_gate.pycore.gpu, with live Metal execution on Apple plus shared spirv/nvptx adapter contractscore.crypto and core.security cover secure random, digests, HMAC, URL-safe encodings, and constant-time comparisons for production auth/session flowsfzweb ships concern-grouped framework modules plus built-in routes for health, readiness, metrics, inspect, search, cookies, sessions, uploads, events, websockets, item CRUD, OpenAPI, and static assetsfozzy.toml