Warning
Keel is under active development
Keel is a very fast, statically-typed interpreted language that aims to combine Rust-like syntax with Python's ease-of-use.
Its goal is to provide a faster alternative to Python that sits closer to low-level languages while remaining accessible to a wide audience.
Contributions and issues are very welcome!
Website Documentation Install Keel Try Keel in your browser
- Fast: Across the benchmarks, on average, Keel is ~8x faster than Python, and ~2.7x faster than LuaJIT's interpreter (-joff).
- Familiar syntax: Rust-like, with Python's ease-of-use
- Statically typed, optional annotations: full type inference, static type checking, polymorphism
- FFI support: call functions from any dynamic library easily by declaring their signatures in a
dylibblock. Per-call overhead is ~3.5x lower than LuaJIT's interpreter (-joff) and ~22x lower than Python. - Embeddable in other programs through a C ABI
- Built-in REPL
Keel also has a VS Code extension that provides syntax highlighting.
struct Point { x: int, y: int }
fn add(a, b) {
return a + b;
}
fn main() {
let p = Point { x: 3, y: 4 };
print(add(p.x, p.y)); // 7
print(add("Hello, ", "world!")); // Hello, world!
let nums = [4, 2, 6, 1, 7];
if nums[0] == 4 {
nums.sort();
print(if nums[0] == 1 { nums[0..3] } else { -1 }); // [1,2,4]
} else {
throw("Error!");
}
}You can install Keel manually by downloading the desired version from the releases page, or use one of the following installation commands.
curl -fsSL https://raw.githubusercontent.com/horacehoff/keel/main/install.sh | shRun the following command in a PowerShell terminal. Administrator privileges are not required to run this command or the installation script.
irm https://raw.githubusercontent.com/horacehoff/keel/main/install.ps1 | iexkeel program.kl # Run a file
keel # Start the REPL
keel -v/--version # Print version
keel -h/--help # Print helpMake sure Rust is installed.
git clone https://github.com/horacehoff/keel && cd keel && rustup toolchain install && cargo build --release
./target/release/keel myfile.klThe roadmap can be found here.
Ad astra per aspera!


