waozi ad5d36a38e
Publish website / build (push) Waiting to run
Build check / check (push) In progress
Preserve authored cleanup and discover re-exported TypeScript enums
2026-12-02 19:02:05 -03:00
2026-07-11 22:37:50 -03:00
2026-11-23 09:19:36 -03:00
2026-12-01 19:57:09 -03:00

Ziran

Ziran is a general-purpose language with direct native, WebAssembly, portable ZX, C and Go output. Master includes Unreleased work; the current version is in VERSION and CHANGELOG.md.

Website and playground · Compiler guide · Current support

Quick start

Build with Make, a C11 compiler and GNU binutils:

make
build/bin/ziran check examples/hello.zi
build/bin/ziran run examples/hello.zi
build/bin/ziran build examples/hello.zi

run checks and executes main; build defaults to a direct native binary. make install-user installs the tools in ~/.local/bin. The same check, ir, build and run workflow handles .zi, .ts and .tsx sources together; ziran ir --project -o build/ir saves their common checked IR. ts2zi checks TypeScript with Microsoft's pinned TypeScript Go compiler (tsgo) and lowers it to Ziran source; see the native TypeScript subset. Full TypeScript semantics through that path is the roadmap's flagship milestone; see the target architecture.

main :: () { print("Hello, World!\n") }

Tools

Source → ZIR → LIR → optimized LIR → ZX → native (ELF/PE, x86-64/AArch64/ARMv7). WebAssembly lowers from verified ZX through zx2wasm; C and Go export from ZIR through zi2c and zi2go, and TypeScript through zi2ts.

Command Purpose
check Validate source and imports.
build Build native output, or select --target=c, go, wasm or zx.
ir / inspect Save checked .zir modules and inspect artifacts.
bundle / run Link .zx executables and run source or ZX.
learn Control native-build corpus recording and offline C-teacher verification/training.
fmt Format source.
guide / features / capabilities Query syntax and target limits.
api Query checked public declarations.

Safety is manual by default, as in C. --checks opts a build into runtime checks; #checks keeps bounds checks in selected source regions. See checks for target-specific behavior.

Documentation

Read When you need
docs/USAGE.md The compiler and standard library guide
docs/IMPLEMENTATION_STATUS.md Supported targets and limits
docs/PACKAGES.md Packages, projects, and lock files
docs/NATIVE_TYPESCRIPT.md Native .ts / .tsx syntax, imports, current limits and the full-project roadmap
docs/ARCHITECTURE.md The compiler pipeline and the target architecture (roadmap)
docs/LANGUAGE_DIRECTION.md Language syntax and directives
docs/OWNED_VALUES.md Owned values and recoverable failures
docs/DIAGNOSTICS.md Diagnostic codes and JSON output
docs/AUTHORING.md Tool-driven editing workflows
docs/LAWS.md Laws and proof certificates
docs/ZX.md The portable ZX format
bench/README.md Running benchmarks
plans/open-work.md What is still open

Standard library and package APIs: ziran-lang.org/modules.html.

Kryon is a separate UI library imported by applications; console programs have no graphics dependency. Repository rules for agents live in AGENTS.md.

Development

Run make check for the retained local suite and make check-bootstrap for bootstrap reproducibility. CHECK_FILTER=text selects matching tests. The compiler uses maintained Ziran and C sources; bootstrap seeds live in bootstrap/. Refresh affected seeds with make update-bootstrap after compiler changes.

S
Description
Ziran language, compiler, and portable bundle runtime
Readme BSD-3-Clause
249 MiB
0 Stars 1 Watchers 0 Forks
2026-12-02
Languages
C 46.9%
Ziran 41.6%
HTML 4.6%
Go 2.4%
Shell 2.1%
Other 2.3%