An expressive low level programming language.
Read the docs at docs.kai-lang.org
Have you built something cool? Feel free to share it here!
- KaiNES: A pure-Kai NES emulator.
- KaiVM: A register-based VM and disassembler.
- Kinit: A minimal init system.
You can download and install Kai through our homebrew tap.
brew install kai-language/tap/kai
In the future, Kai will offer official binary distribution through apt and other package managers. See building Kai.
Before you can begin building Kai, you must install the following dependencies:
- Swift 4.0
- LLVM 4 or higher
- libgit2
On Mac, the preferred way to install Swift 4 is by installing Xcode. After installing Xcode, make sure to run it once and say yes
to installing the command-line tools.
By far, the easiest way to install LLVM on Mac is through brew. After setting up brew, run the following to install the correct version of LLVM:
brew install llvm
Now that LLVM is installed, append the directory to your path in ~/.bash_profile
/usr/local/opt/llvm/bin
In order for Swift Package Manager to build against LLVM's libraries, we need to setup a pkg-config file. Thankfully, LLVMSwift has a script for this:
Grab the script by running swift package update
in Kai's root directory. Then, run:
swift .build/checkouts/LLVMSwift.git-<version-here>/utils/make-pkgconfig.swift
Just like LLVM, libgit2 can be installed through brew.
brew install libgit2