A simple templating language for building UI components, written in Odin.
- Lightweight and fast templating engine
- Written in Odin for native performance
- Simple syntax for component-based UI generation
- Odin compiler (latest version)
git clone https://github.com/nyehamene/bet-odin.git
cd bet
task buildThis creates the bet executable in the project root.
# Build a template file
./bet build -f template.bet
# Format a template file
./bet fmt -f template.bet
# Show help
./bet help
# Show version
./bet version# Run with file watching (requires entr)
task watch -- build -f template.bet
# Run tests
task test
# Run tests with file watching
task test-watchThe language grammar is defined in a separate repository: better-template-grammar
Bet uses a simple component-based syntax:
My_Fancy_Button :: component {
text: "Click me";
color: #fff;
(button
{style="color: \{color}"}
(text))
}
bet/
├── src/ # Source code
│ ├── bet/ # Core library (parser, tokenizer, AST)
│ ├── build.odin # Build system
│ └── main.odin # CLI entry point
├── Taskfile.yml # Development tasks
See LICENSE