Spear is a simple (and kinda boring) build system for Odin. I made it mostly out of boredom, but it can still be useful if you want something minimal.
chmod +x build.sh
./build.shspear init # creates a Spear.toml in the current directory
spear run # builds and runs the default target
spear build # builds the project-
collections Groups of libraries. Shared across all targets.
-
target A buildable unit (like a project). There is a default target, but you can define others (e.g.
test,examples). -
compiler Configuration for the Odin compiler (path, flags, etc).
This example shows a slightly more complete setup, with custom compiler options, multiple collections, and more than one target.
[package]
name = "game"
version = "0.1.0"
author = "okkami"
[project]
output_dir = "bin"
default_target = "game"
[compiler]
path = "odin"
vet = false
strict = false
opt = "none"
[collections]
extra = "extra"
oge = "extra/oge" # very large engine
[target.game]
path = "game"
kind = "exe"
[target.test]
path = "test"
kind = "exe"default_target = "game"meansspear runwill run the main game.- You can still build other targets manually (like
test). collectionslets you organize libraries likeogeunderextra/oge.- Compiler options (
vet,strict,opt) are optional and just passed to Odin.