Simple Odin project init from templates
- Odin 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| bubbletext | ||
| templates | ||
| tools | ||
| vendoring | ||
| .gitignore | ||
| ATTRIBUTIONS | ||
| LICENSE | ||
| main.odin | ||
| PLANS | ||
| README | ||
__ __
.-----.| |_.-----.--------.-----.| |
| _ || _| -__| | _ || |
|_____||____|_____|__|__|__| __||__|
|__|
---
Simple personal CLI tool for generating Odin projects from either a Basic
(hello world), Raylib, or Library template. C and Go hello-world projects are
also available with the Basic template. C also supports Raylib, using Make
to link the raylib 6.2 static library downloaded into vendor/ during project
creation.
Both C templates use unity builds: main.c includes the project helper
implementations and is the only application source compiled.
You must have the following CLI tools installed:
- tar with gzip support for extracting vendored libraries (C Raylib projects)
- go for "--lang go"
- jj (Jujutsu VCS) for "--with-jj" flag
- fj (Forgejo CLI) for "--create-repo" flag
otempl also requires the system libcurl and zlib libraries. The current Linux
build dynamically links libcurl.so.4 and libz.so.1; curl is not statically
bundled. Downloads use libcurl directly, so the curl CLI is not required.
When building from source, install the development packages for libcurl and
zlib as well as the Odin compiler.
To build the project, compile the Odin build script once, then run a target:
> odin build tools/build.odin -file -out:build
> ./build build
> ./build run hello-odin
Other targets are `release`, `debug`, `bubbletext-font`, `install`, and `clean`.
The `install` target writes to `~/.local/bin`.
Usage example:
> otempl some-game \
> --type raylib \
> --description "Description for the game" \
> --with-jj \
> --create-repo
> otempl hello-c --lang c
> otempl hello-go --lang go
> otempl my-game --lang c --type raylib
> cd my-game
> make debug
> make run
The C Raylib template requires GNU Make, a C17 compiler, and platform graphics
development libraries. Project creation downloads the prebuilt raylib release
for Linux amd64/arm64 or macOS into vendor/. Builds use vendor/raylib-* without
further downloads. See the generated README for other build options.