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
ExperimentalWrite clear .zi programs, check them before they run, and choose C, C++, Go, Rust, or Python output, or a portable bundle.
Latest release: v0.2.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 readable native output or package the portable subset as a .zib bundle. Inspect each step along the way.
What 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 exampleChoose a target to see its build command.
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.
.zi module.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.