A starting point for Odin projects in Zed. It includes build tasks, clickable compiler errors, OLS settings, formatting, tests, and a debugger configuration.
- Odin on your
PATH - Zed with the Odin extension installed
Install the extension from zed: extensions. It downloads OLS automatically.
The project still builds without the extension, but editor integration will not
work.
./build.sh # debug build
./build.sh release # optimized build
./build/debug/appIn Zed, run task: spawn and pick odin: build & run.
| Task | What it does |
|---|---|
odin: build & run |
Builds and runs the debug binary |
odin: build (debug) |
Builds with -debug -o:none |
odin: build (release) |
Builds with -o:speed -no-bounds-check |
odin: check |
Type checks without producing a binary |
odin: test |
Runs every @(test) procedure in src |
.zed/debug.json launches build/debug/app with CodeLLDB. Run a debug build
first. The debugger does not build the binary and will otherwise launch a stale
file or fail because the file does not exist.
build.sh build script
ols.json language server settings
odinfmt.json formatter settings
src/ project code and an example test
.zed/tasks.json build and run tasks
.zed/settings.json editor and OLS settings
.zed/debug.json debugger launch configuration
build/ is generated and ignored by Git.
Odin prints errors as path/main.odin(12:5). build.sh rewrites them as
path/file.odin:12:5 so Zed makes the locations clickable.
The output binary is named app. That name appears in build.sh,
.zed/tasks.json, and .zed/debug.json. Change all three together.
src/main_test.odin shows how the test task is wired. Delete it after adding
real tests.
| Tool | Version |
|---|---|
| Odin | dev-2026-07:301c287de |
| Zed | 1.12.1 |
| Zed Odin extension | 0.3.15 |
Odin development builds move quickly. Check the compiler version first if a newer build breaks the template.