Zed is a dataflow programming language built from a single core premise:
removing the ability to read the "current" value of a mutable place turns every
program's source text into an explicit, acyclic value-dependency DAG. From that
single premise follow automatic multicore/GPU parallelization, zero data races,
exact pause-free reference counting with in-place reuse, bit-identical
deterministic parallel reductions, set-theoretic failure-as-data typing,
partial-evaluation staging, and reactive incrementality over a 7-generator core
(fam, reindex, discard, fold, fix, gen, port).
Current Implementation Status (
R0–R2Active): Organized across 22 focused crates in a strictly acyclic 5-layer DAG (zedc check,run,build,test,fmt,replay,pin,info), backed by a 4-way differential oracle (zed-kernel== pre-PE JIT == post-PE JIT == standalone stripped AOT ELF) andO(n log n)scaling verification. Live milestone progress is tracked indocs/plan_dag.md(viewable interactively viamake-no-mistakes). The complete, self-contained language specification and compiler architecture lives indesign/README.md.
Every crate dependency flows strictly downward, verified mechanically by
cargo run -p xtask -- check-dag:
| Layer | Crates | Role |
|---|---|---|
| Layer 0 | zed-span, zed-intern, zed-hash, zed-num, zed-diag, zed-ds |
Zero/minimal-dep foundation: Copy spans & SymId interner, framed BLAKE3 content addressing, exact Int/Rat/CanonF64, structured diagnostics, shared arenas & graph algorithms. |
| Layer 1 | zed-syntax, zed-kernel, zed-domains, zed-zir |
Lexer & arena AST; small trusted 7-generator kernel evaluator; exact unbounded integer intervals, congruences & reduced products; canonical RVSDG ZIR, dominator contification & RC memory planner. |
| Layer 2 | zed-types, zed-resolve, zed-check |
Hash-consed set-theoretic type arena; lexical & acyclic multi-unit resolution with capability grants & @hash pinning; local bidirectional checker & AST-to-ZIR elaborator. |
| Layer 3 | zed-stage, zed-opt, zed-verify |
Interleaved partial evaluation (mix); certificate-emitting optimizer; independent zero-shared-code verifier. |
| Layer 4 | zed-rt, zed-codegen, zed-driver, zedc |
Standalone minimal RC runtime (zero compiler dependencies); SSA Cranelift JIT/AOT + LLD backend; incremental compiler driver & prelude linker; thin zedc CLI. |
| Tooling | zed-benchkit, xtask |
Strict O(n log n) 1x-vs-8x scaling harness (<= 9.0x goal / < 10.5x hard ceiling); typed Rust workspace verification CLI. |
Repository layout outside crates/:
design/— complete 7-part language specification and compiler architecturedocs/— live milestone DAG (docs/plan_dag.md) and project artworkzed/grammar/— PEG lexical, surface syntax, and notation grammarszed/prelude/— standard Zed prelude library (core.zed,math.zed), embedded at compile timezed/corpus/— 31 end-to-end reference Zed programs, input/output fixtures, and standalone Rust reference oracle (zed/corpus/ref/)
# Run full verification checks (DAG check, fmt, clippy -D warnings, tests, rustdoc)
cargo run -p xtask -- check
# Verify crate DAG layers and docs/plan_dag.md integrity alone
cargo run -p xtask -- check-dag
# Run scaling benchmarks under optimized bench-test profile
cargo test --workspace --profile bench-test -- --test-threads=1
# Run the zedc CLI
cargo run -p zedc -- info
# Launch the live plan DAG viewer on http://127.0.0.1:4317 (from a make-no-mistakes checkout)
node ../make-no-mistakes/src/server.ts --repo . --plan docs/plan_dag.md --port 4317All code follows RUST_STANDARDS.md:
- Zero borrow-checker
.clone()/Rc/RefCell/unsafedodges; flat owning arenas withCopyu32IDs. - Pure value-to-value data-flow passes ready for future self-hosting.
- Strict workspace Clippy & rustc lints (
unsafe_code = "forbid"by default,unwrap_used = "deny",allow_attributes = "deny", zeroignore-interior-mutabilityexemptions). - Fast incremental builds via
opt-level = 0indev, LLD linking, and zerodylibworkarounds.
Licensed under the MIT License.