Build from Source

For contributors and developers who want to work on the engine itself.

Requirements

Tool Version Notes
Zig 0.16.0 exactly 0.15 and earlier not supported
Git any
Git LFS any Required for binary assets in examples/

Clone and build

git lfs install            # once per machine
git clone {{< param repo >}}.git
cd turian

zig build          # compile studio + CLI (Debug)
zig build run      # compile and launch Turian Studio
zig build test     # run all unit tests
zig build ci       # tests + ReleaseFast (matches CI)

Output binaries land in zig-out/bin/:

  • turian-studio — the GUI editor
  • turian-cli — the headless CLI

CLI usage (from source)

./zig-out/bin/turian-cli new-project ../my-game "My Game"
./zig-out/bin/turian-cli info        ../my-game
./zig-out/bin/turian-cli build       ../my-game

Adding a built-in component

  1. Create engine/components/MyComponent.zig:
    pub const MyComponent = struct {
        value: f32 = 1.0,
    };
    
  2. Register it in engine/components/root.zig.
  3. Add a tag to the Component union in engine/scene/Component.zig.
  4. Update BuiltinEntry.zig and scanner.zig (populateBuiltins).

Running tests

zig build test

Tests live inline in source files using Zig's built-in test blocks.

CI/CD

The GitLab pipeline (.gitlab-ci.yml) and how it's kept fast (a prebuilt CI image, cross-branch cache reuse, the one-time image bootstrap a Dockerfile change needs) are documented in [docs/ci.md]({{< param repo >}}/-/blob/main/docs/ci.md) in the repository — maintainer-facing, not needed for a typical contribution.


← All docs Edit this page