Project Configuration

Zith uses ZithProject.toml for project configuration, similar to Cargo.toml in Rust or package.json in Node.js.

Basic Structure

[project]
name = "my_project"
version = "0.1.0"
edition = "2024"
authors = ["Your Name <[email protected]>"]
description = "A brief description of your project"

[dependencies]
# External dependencies go here

[build]
# Build configuration

[profile.release]
# Release profile settings

Sections

[project]

Required project metadata:

[dependencies]

Specify external libraries your project needs:

[dependencies]
networking = "1.2.0"
graphics = { version = "2.0", features = ["vulkan"] }
local_lib = { path = "../local_lib" }

[build]

Build configuration options:

[build]
target = "native"  # or specific architecture
optimize = true
debug_symbols = false

[profile.*]

Define build profiles:

[profile.release]
optimize = "size"  # or "speed"
lto = true
strip_symbols = true

[profile.dev]
debug_symbols = true
optimize = false

Example Configuration

[project]
name = "game_engine"
version = "0.2.0"
edition = "2024"
authors = ["GalaxyHaze <[email protected]>"]
description = "A high-performance 2D game engine"
license = "MIT"
repository = "https://github.com/galaxyhaze/zith-game-engine"

[dependencies]
renderer = "1.5.0"
audio = { version = "0.9", features = ["spatial"] }
utils = { path = "../utils" }

[build]
target = "x86_64-unknown-linux-gnu"
optimize = true

[profile.release]
optimize = "speed"
lto = true
strip_symbols = true

[profile.dev]
debug_symbols = true
incremental = true

Next Steps