A reading-first programming language.
Alpha · v0.4.1 · Compiler in C · Native backend via C emission
Zenith is a language built for study, small projects, and research. It is a practical exploration of language design, compilers, diagnostics, runtime, and accessible tooling. It is not a production language or a market product.
Four rules drive every decision:
- Clarity over clever syntax. Code should read like intention, not puzzle.
- Explicit over magic. Behavior visible at the call site.
- Reading before short typing. Scannable names, predictable structure.
- Cognitive accessibility as a requirement. Diagnostics explain; docs reduce load.
Ref: language/decisions/033-language-philosophy-and-manifesto.md
| Item | Value |
|---|---|
| Public status | alpha |
| Source version | 0.4.1-alpha.1 |
| Latest packaged release | 0.3.0-alpha.3 (2026-04-24) |
| Compiler | v2, written in C |
| Backend | C emission → native binary |
| Runtime | runtime/c/ — ARC, single-isolate |
| Standard library | stdlib/std/ |
| v1 plan | complete — all 7 tiers (T0–T7) closed |
APIs may change. Some features are experimental.
Breaking changes may happen between pre-releases before 1.0.0.
Requirements: Python 3 and GCC or Clang on PATH.
# Build from source
python build.py # Linux / macOS
build.bat # Windows
# Verify
./zt.exe doctorSingle file, no project needed:
namespace script
func main()
print("Hello from Zenith")
end
./zt.exe run hello.zt./zt.exe create my_app --app
./zt.exe run my_appScaffold structure:
my_app/
zenith.ztproj
src/
app/
main.zt
zenith.ztproj:
[project]
name = "my-app"
kind = "app"
version = "0.1.0"
[source]
root = "src"
[app]
entry = "app.main"
[build]
target = "native"
output = "build"
profile = "debug"src/app/main.zt:
namespace app.main
func main()
print("Hello from Zenith")
end
Zenith 0.4.1-alpha.1
Usage: zt <command> [input] [options]
Build and Run:
check Validate code without building
build Compile to native executable
run Compile and run
test Run tests
Project:
create New project scaffold
fmt Format source files
clean Remove build output
summary Project overview and session context
Docs and Tools:
doc Validate or show documentation
explain Look up a diagnostic code
doctor Verify Zenith installation
Advanced:
repl Evaluate expressions interactively
perf Performance benchmarks
zt help <command> Detailed help for a command
zt --version Print version
Common flags: --ci --profile <level> --all --focus <path>
--since <git-ref> --filter <name> --lang <lang> -o <output>
--verbose --check
ZPM (local package manager):
zpm init
zpm add <package>
zpm installRef: docs/reference/cli/zt.md · docs/reference/cli/zpm.md
Types and values
optional<T>andresult<T,E>with?propagationtuple<A, B, ...>lowered to generated C structstrait,apply, andany<Trait>for dynamic dispatchlist<T>,map<K,V>,set<T>with generic runtime collections- Explicit type conversion via
std.int,std.float,std.bool
Expressions and control flow
f"..."string interpolationwithexpression for struct field update without mutationfor i in range(...)allocation-free C counter loopmatchwithcase elseexhaustiveness checkingusingfor scoped resource cleanup
Diagnostics and attributes
- Structured diagnostics with stable codes
zt explain <code>for every diagnosticattr deprecated(...),attr todo(...),attr skip(...),attr test(...)- Match exhaustiveness warnings
- Naming convention readability warnings
- Cognitive accessibility profiles:
beginner,balanced,full
Toolchain
- Single-file mode:
zt run file.ztwithout a project zt createscaffold forappandlibprojectszt fmtformatter with--checkgatezt cleanremoves the build output directoryzt summaryshows project info and session context (FOCUS/NEXT anchors)- FFI 1.0 — call C from Zenith
- Local ZPM MVP for package management
- Local LSP / VS Code extension (beta)
- ZDoc documentation format
Standard library (std.*):
text · bytes · io · fs · fs.path · net · http · json ·
encoding · hash · math · random · regex · format ·
collections · validate · test · os · time · debug ·
int · float · bool · lazy · concurrent · console
Default model: non-atomic ARC, single-isolate.
- Heap-managed values use reference counting.
- Sharing values between threads requires explicit copy or transfer.
- Reference cycles can leak memory in the alpha.
- Raw-pointer and manual-memory surfaces are future scope.
Ref: runtime/c/README.md · language/spec/runtime-model.md
examples/hello-world
examples/structs-and-match
examples/optional-and-result
examples/multifile-imports
examples/std-json
examples/extern-c-putsRef: examples/README.md · language/spec/final-language-contract.md
# Full suite
python run_all_tests.py
# Quick gates
python build.py
./zt.exe check zenith.ztproj --all --ci
python run_suite.py smoke --no-perf
# Performance gates
tests/perf/gate_pr.ps1
tests/perf/gate_nightly.ps1| Path | Contents |
|---|---|
docs/public/ |
User docs by section: get started, learn, language, stdlib, packages, licensing |
docs/reference/language/ |
Types, modules, errors and language rules |
docs/reference/grammar/ |
Syntax and grammar lookup |
docs/reference/diagnostics/ |
Diagnostic lookup |
docs/reference/cli/ |
zt and zpm reference |
docs/reference/stdlib/modules.md |
Standard library index |
language/spec/final-language-contract.md |
Final/current/future language contract |
language/spec/language-reference.md |
Implementation-facing language reference |
language/decisions/INDEX.md |
Decision log with status |
docs/internal/planning/ |
Roadmaps and checklists |
CHANGELOG.md |
Release history |
compiler/ frontend, semantic, IR, backend, driver
runtime/c/ C runtime and memory model
stdlib/ standard library and ZDoc sources
language/spec/ normative specification
language/decisions/ decisions with context and status
docs/public/ user-facing guides by section
docs/reference/ reference material
docs/internal/ plans, reports, governance
docs/generated/ durable generated documentation only
examples/ demonstration projects
tests/ behavior, semantic, runtime, fmt, LSP, perf suites
tools/ helper scripts
packages/ official packages (Borealis and others)
Zenith is developed with strong AI assistance. That is part of the study.
AI assists with documentation, test creation, inconsistency checks, and implementation speed. Language decisions, scope, validation gates, and project direction are human responsibilities. The decision log and specs exist to keep that boundary explicit.
Apache-2.0 OR MIT — choose either.
LICENSE·LICENSE-APACHE·LICENSE-MITCONTRIBUTING.md·TRADEMARK_POLICY.md