Write readable code
Give data a shape with records and enums. Connect procedures, generics, arrays, and borrowed slices with explicit imports.
Explore the languageOpen source programming language
ExperimentalOne readable language with native, C, Go, portable .zx bundles, and WebAssembly. Inspect the ZIR and follow your source all the way through.
Latest release: v0.7.0. Build from source today. See current support.
main :: () {
print("Hello, World!\n");
}
Hello, World!Score :: struct {
value: s32;
bonus: s32;
}
Total :: (score: Score) -> s32 {
return score.value + score.bonus;
}
Answer :: () -> s32 {
score: Score = Score.{value = 40, bonus = 2};
return Total(score);
}
42#import "text"
Answer :: () -> s32 {
if StartsWithFoldASCII("Ziran", "zi") {
return 1;
}
return 0;
}
1One source.
Your choice of output.
Why Ziran
Ziran keeps the language and toolchain together so you can start small and inspect each step.
Give data a shape with records and enums. Connect procedures, generics, arrays, and borrowed slices with explicit imports.
Explore the languageCatch unsupported forms and prove #law obligations at build time. Get a counterexample when a law fails.
Generate C or Go, link a portable ZX bundle, or emit WebAssembly. Compare real outputs and measurements in the target matrix.
Inspect all four outputsWhat you can build
Change a value, try a different prefix, or choose an output. Open the example in the editor to explore further.
Change the fields and see their total.
See exampleTry a prefix with ASCII case folding.
See exampleSource → ZIR → LIR → optimized LIR → ZX → native. Wasm lowers from ZX; C/Go export from ZIR.
ziran build --target=c --root . -o out/c source.ziYour path
Clone the repository, build the tools with a C compiler and make, then check and run your first bundle.
git clone https://github.com/ziranlang/ziran.git
cd ziran
make
build/bin/ziran versionFollow the quick start →.zi module.Libraries
127 standard modules and 17 packages, each with an API reference generated from its source, from text and JSON to image codecs.
Browse all modules →Project status
Ziran is under active development. Native and portable targets cover tested subsets; language coverage and backend parity are still growing. The status page distinguishes what works today from planned work.
Read the current status →Support Ziran
Ziran is independent, open-source work. If it is useful to you, a contribution funds development, maintenance, and research.