Getting Started
Installation
From source (Rust)
bash
# Clone the repository
git clone https://github.com/otabekoff/zink.git
cd zink/lang
# Build the release binary
cargo build --release
# The binary is at target/release/zink (or zink.exe on Windows)Run a file
bash
./target/release/zink examples/hello.zinkStart the REPL
bash
./target/release/zink
# ⚡ Zink v0.1.0 — REPL
# >>> say "Hello!"
# Hello!Pipe from stdin
bash
echo 'say "Hello from pipe!"' | ./target/release/zink -Try Online
No installation needed — use the Zink Playground to write and run Zink code directly in your browser.
Your First Program
Create a file called hello.zink:
zink
# hello.zink
let name = "World"
say "Hello, {name}!"
fn add(a, b) {
return a + b
}
say "2 + 3 = {add(2, 3)}"Run it:
bash
./target/release/zink hello.zink
# Hello, World!
# 2 + 3 = 5Project Structure
zink/
├── lang/ # Rust interpreter
│ ├── src/
│ │ ├── main.rs # CLI + REPL
│ │ ├── lib.rs # Library + WASM bindings
│ │ ├── lexer.rs # Tokenizer
│ │ ├── parser.rs # AST builder
│ │ └── interpreter.rs # Evaluator
│ └── examples/ # Example .zink programs
├── playground/ # Browser playground (React + Vite)
├── docs/ # This documentation (VitePress)
└── extension/ # VS Code extensionNext Steps
- Variables — Learn about
letbindings - Functions — Define and call functions
- Control Flow —
if,while, andloop - Built-in Functions — 28 functions included