Build from Source

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

Requirements

  • .NET 10 SDK
  • glslc to compile shaders — part of the Vulkan SDK, or sudo apt install glslc
  • A Vulkan 1.3 capable GPU driver
  • Linux or Windows

Clone and build

git clone https://github.com/MASS4ORG/Turian.git
cd Turian
./build.sh compile          # restore, compile shaders to SPIR-V, build every project

On Windows use build.cmd or build.ps1. The build is orchestrated by NUKE; a plain dotnet build also works once the shaders are compiled.

Run Studio and the CLI from source

# Studio, opening a project
dotnet run --project Turian/Editor/Studio -- --project ../TurianExamples/example-01

# CLI
dotnet run --project Turian/Editor/CLI -- new /tmp/MyGame
dotnet run --project Turian/Editor/CLI -- export /tmp/MyGame
dotnet run --project Turian/Editor/CLI -- screenshot ../TurianExamples/example-01 --out shot.png

The example projects live in the separate turian-examples repository; clone it next to Turian.

Repository layout

Gaya/                 the plugin platform Studio runs on (Gaya.Sdk, Gaya.Host); no Turian references
Turian/
  Engine/
    Attributes/       attributes shared by engine, editor and your scripts ([Range], [Button], [TypeId]…)
    Core/             Vulkan renderer, scene graph, components, assets, input, localization, serialization
    UI/               .ui / .uss game UI on Guinevere
  Editor/
    Core/             UI-agnostic editor logic: build system, asset import, inspector, play mode
    Gaya.Plugin/      Turian Studio itself — a Gaya plugin (panels, commands, viewports)
    Studio/           the desktop executable hosting Gaya and the plugin
    CLI/              turian-cli
    Bootstrap/        the turian-cli / turian-studio launchers of the release packages
    CSharp/           Roslyn source generators and analyzers
Turian.Tests/         engine and editor tests
.nuke/                build, packaging and release targets

Studio is a UI shell: logic belongs in Editor/Core or the engine, where the CLI and tests can use it too.

Adding a built-in component

Built-in components live in Turian/Engine/Core. Every serialized type needs a stable, unique [TypeId] — generate a new GUID once and never change it, because scene files store it:

namespace Turian.Engine.Core;

/// <summary>Makes a node bob up and down.</summary>
[ComponentContextMenu("Motion/Bobber")]
[TypeId("0b8d9c3e-6f3a-4a52-9d1e-2f5c7a1b8e40")]
public class BobberComponent : Component
{
    /// <summary>Height of the motion in metres.</summary>
    public float Amplitude { get; set; } = 0.25f;

    /// <inheritdoc />
    public override void OnUpdate(float deltaTime) { /* … */ }
}

[ComponentContextMenu] places it in the Inspector's Add Component menu.

Running tests

dotnet run --project Turian.Tests/Turian.Tests.csproj

Use dotnet run, not dotnet test: the suite runs on Microsoft.Testing.Platform. CI runs the same tests through ./build.sh Restore Compile TestReport.

Packaging

./build.sh Pack --configuration Release --runtime-identifier linux-x64   # zip archive
./build.sh Pack DebianPackage --configuration Release --runtime-identifier linux-x64
./build.sh Pack --configuration Release --runtime-identifier win-x64     # zip + NSIS installer

Artifacts land in artifacts/. The Windows installer needs makensis (NSIS), which also runs on Linux.

CI/CD

GitHub Actions run the tests on every push (ci.yml). A daily job tags a release when there are new commits and publishes the Windows and Linux packages, the GitHub release and the ghcr.io/mass4org/turian-cli container image.

Contributing

Read the contributing guidelines: Conventional Commits, pull requests against main, and no new compiler warnings.


← All docs Edit this page