What each piece is
| Tool | Type | Role in the stack |
|---|---|---|
| Zed | Code editor | Where I write all the code |
| Roc | High-level language | The language I use to build applications |
| Zig | Systems language | The language the Roc compiler is written in and a language I can write in directly |
How they fit together
I started by installing Zed, a fast, modern code editor. Inside Zed I can write two different languages:
- Roc — a friendly, purely functional language that feels pleasant to use while still compiling to fast native code.
- Zig — a simple, explicit systems language (a modern alternative to C) that gives me full control and tiny binaries.
Interesting connection: the Roc compiler itself is written in Zig. So when I write Roc code in Zed, a Zig-based compiler turns it into a native executable.
Quick mental model
text
Zed (editor)
├── I write Roc code here → Roc compiler (written in Zig) → fast binary
└── I write Zig code here → Zig compiler → fast binary
Setup summary (Debian)
Zed Downloaded from zed.dev and launched normally.
Roc
Bash
curl --proto '=https' --tlsv1.2 -sSf https://roc-lang.org/install_roc.sh | sh
source ~/.bashrc
Zig Installed the official Linux binary and added it to PATH.
Daily workflow aliases
Roc
- rv → version
- rr file.roc → run
- rb file.roc → build
- rbo file.roc → optimized build
- rrepl → REPL
- rfmt → format
- rcheck file.roc → type check only
Zig
- zv → version
- zr file.zig → run
- zb file.zig → build (debug)
- zbs file.zig → build small
- zbf file.zig → build fast
- zfmt → format
- ztest → run tests
- zbuild / zbr → for projects created with zig init
In Zed
- Open the command palette (Ctrl+Shift+P)
- Search for “extensions”
- Install the roc extension for syntax highlighting and language support
- Zig already has solid support
This is the full setup that began with downloading Zed and eventually included both Roc and Zig.