Jazz - JIT/AOT compiled programming language that uses gccjit for emitting machine code.
You can see roadmap there: Jazz Roadmap
comptime functionsDONE!- Macros
Jazz2C TranslatorDONE!Struct initialization:DONE!
$ cd book
$ mdbook build
$ mdbook serve
Now you can open http://localhost:3000/
in your browser.
Factorial:
import "std/libc.jazz"
func factorial(x: i32) i32 {
if x == 0 {
return 1;
} else {
return factorial(x - 1) * x;
}
}
pub func main() i32 {
printf("%i\n",factorial(5));
return 0;
}
- Install libgccjit with version >= 9:
Fedora Linux
Ubuntu Linux
sudo dnf install libgccjit-devel
sudo apt install libgccjit-9-dev
- Run
cargo build --release
- Run
cargo install --path .
- AllegroJazz Jazz bindings to Allegro 5 library.
- Snake Snake game written in Jazz using AllegroJazz library