Open source programming language

Experimental

The Ziran programming language

One readable language, four outputs: C, Go, portable .zx bundles, and WebAssembly. Inspect the checked IR and follow your source all the way through.

Latest release: v0.4.2. Build from source today. See current support.

Try Ziran in your browserEdit an example, then press Run.
Ziran / source.zi
text_demo.zi A library, one import away.
#import "text"

Answer :: () -> s32 {
    if StartsWithFoldASCII("Ziran", "zi") {
        return 1;
    }
    return 0;
}
Example output1
Runs in your browser · portable subsetSource & commands
  1. Write.zi source
  2. CheckOne checker
  3. BuildNative or portable

One source.
Your choice of output.

Outputs, IR & benchmarks

Why Ziran

A small, inspectable toolchain.

Ziran keeps the language and toolchain together so you can start small and inspect each step.

01 / Write

Write readable code

Give data a shape with records and enums. Connect procedures, generics, arrays, and borrowed slices with explicit imports.

Explore the language
02 / Check

Check before building

Catch unsupported forms and prove #law obligations at build time. Get a counterexample when a law fails.

Explore the tools
03 / Build

Choose an output

Generate C or Go, link a portable ZX bundle, or emit WebAssembly. Compare real outputs and measurements in the target matrix.

Inspect all four outputs

What you can build

Learn through examples.

Change a value, try a different prefix, or choose an output. Open the example in the editor to explore further.

01 / LanguageRecords and procedures

Change the fields and see their total.

See example
02 / LibraryText processing

Try a prefix with ASCII case folding.

See example
03 / ToolchainFour outputs, one source

Choose a target or inspect the checked IR.

Open the target matrix

Your path

Build your first program.

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 version
Follow the quick start →
  1. InstallBuild the current toolchain from source.
  2. WriteSave a small .zi module.
  3. RunCheck, bundle, and see the result.

Libraries

Modules and packages.

97 standard modules and 16 packages, each with an API reference generated from its source, from text and JSON to image codecs.

Browse all modules →

Project status

Working core.
Experimental edges.

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

Support development.

Ziran is independent, open-source work. If it is useful to you, a contribution funds development, maintenance, and research.

Monero
Bitcoin

Support Ziran

Monero