Grimoire is a statically-typed, magic-themed programming language designed to let you cast spells and weave logic through incantations. It replaces mundane programming constructs with arcane terminology, making every script feel like a page from a wizard's tome.
- Magic Syntax:
castyour output,lookfor conditions, andsustainyour loops. - Spells: Define reusable blocks of logic as
spells andsealyour results. - Chants: Iterate through your data with
chant. - File Extension: Save your arcane scripts with the
.hexextension.
Download the latest release for your platform from the Releases page:
| Platform | Download |
|---|---|
| Windows | grimoire-windows-x64.zip |
| Linux | grimoire-linux-x64.tar.gz |
| macOS | grimoire-macos-x64.tar.gz |
Extract the archive and add the grimoire executable to your PATH.
Grimoire uses CMake for building. Ensure you have CMake and a C++ compiler installed.
mkdir build
cd build
cmake ..
cmake --build .Once built, you can run Grimoire scripts using the generated executable:
# Windows
.\Release\grimoire.exe ..\examples\hello.hex
# Linux / macOS
./grimoire ../examples/hello.hexHere is a simple Fibonacci spell in Grimoire:
# Fibonacci spell
spell fib(n) {
look (n <= 1) {
seal n;
}
seal fib(n - 1) + fib(n - 2);
}
cast fib(10);
For more details on syntax, check out docs/syntax.md and docs/design.md.