An independent toolchain for the Jai programming language:
jaic, a compiler that type-checks, interprets and natively builds real Jai programs and libraries, with its own standard library;jailsp, a language server;jaifmt, a formatter;jailint, a linter.
It is written from public documentation and third-party Jai code, without access to the official compiler or its modules. It builds native executables for macOS, Linux and Windows (x86-64 and arm64) and WebAssembly, and real projects such as the Focus editor compile and run.
Each install includes jaic, jailsp, jailint, jaifmt and the standard library.
brew install matteopolak/tap/jai # macOS, Linux
winget install matteopolak.jai # Windows
nix profile install github:matteopolak/jai # Nix
curl -fsSL https://raw.githubusercontent.com/matteopolak/jai/main/install.sh | shThe last line is the install script for macOS and Linux. There are also a PowerShell script, prebuilt archives, a GitHub Action and build-from-source steps.
Node :: struct(T: Type) {
next: *Node(T);
value: T = 19;
}
answer :: () -> int { return 23; }
main :: () -> int {
node: Node(int);
return node.value + #run answer(); // Exit status: 42
}jaic check examples/compile-time-record.jai # type-check only
jaic run examples/compile-time-record.jai # run in the interpreter
jaic build examples/compile-time-record.jai -O2 # native executable (-os windows to cross-build)
jaic check broken.jai --color always # force coloured errors (or NO_COLOR=1 to turn them off)
jaic run examples/tour/main.jai # the language tour the playground opens with
jailint src/ # lint every .jai file under src/
jailint src/ --fix # apply the safe fixes- VS Code and Open VSX editors: the Jai extension (docs).
- Neovim 0.11+: jai.nvim (language server, formatter, linter, toolchain download).
- Anything else: run
jailspas a language server over stdio (language server).
- Features: what works, performance, and what is missing
- Language server · Formatter · Linter · Browser build
- Compatibility with real projects · Changelog · All docs
Pull requests are not accepted. Bug reports and feature requests are welcome as issues; see CONTRIBUTING.md.
AGPL-3.0-or-later, with a runtime library exception: programs you compile are yours to license however you like. See docs/license.md.