Getting Started

From first line to full toolchain — start in the playground, go further with the CLI.

Try It Now

The fastest way to explore Zym is the Playground. It runs the full language in your browser — variables, functions, structs, closures, continuations, macros, the preprocessor — everything, no install required.

Playground

Write, run, and experiment with Zym directly in the browser. The full language, right here.

Open Playground

This is your entry point. Explore the syntax, test ideas, see what Zym feels like. When you're ready for more — file I/O, native modules, compiled executables — that's where the CLI comes in.

Get the CLI

The Zym CLI is a single binary that compiles, runs, packages, and inspects Zym programs. It's the full toolchain — everything you need to go from script to standalone executable.

Download

Pre-built Binaries

Windows and Linux binaries — drop in, run scripts, no build step.

Alternative

Build from Source

Clone the repository and build with CMake. Full control over the build.

Hello World

Create a file called hello.zym:

hello.zym
print("Hello from Zym!");

Run it:

terminal
zym hello.zym

Your First Script

A slightly richer example — variables, functions, loops, and a list.

example.zym
func fibonacci(n) {
    if (n < 2) return n;
    return fibonacci(n - 1) + fibonacci(n - 2);
}

var results = [];
for (var i = 0; i < 10; i = i + 1) {
    push(results, fibonacci(i));
}
print(results);
terminal
zym example.zym
// → [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]

Compile & Package

Zym compiles to bytecode and can package scripts into standalone executables.

Compile to Bytecode

Compile once, run anywhere — bytecode is portable across platforms.

terminal
zym example.zym -o example.zbc    // compile to bytecode
zym example.zbc                    // run bytecode directly

Build a Standalone Executable

Package your script into a single binary — no runtime install needed for end users.

terminal
zym example.zym -o example.exe    // Windows
zym example.zym -o example         // Linux
Cross-platform packing: Use -r to specify a runtime binary for a different platform. See the CLI Reference for details.

Where to Go Next

You've got the basics. Here's where to dig deeper depending on what you need.