Kit blends Clojure-style expressiveness with Hindley-Milner type inference, an effect system, native compilation, and parallel execution. Professional-grade tooling with Rust-quality error messages, built-in memory profiler, and JIT optimization for maximum developer productivity.
$ cargo build --release && kit new my-project
# Functional programming made simple
double = fn(x) => mul x 2
numbers = [1, 2, 3, 4, 5]
# Type-safe transformations
result = map double numbers
# => [2, 4, 6, 8, 10]
# Pattern matching with ADTs
match result
| [x, y, ...rest] -> add x y
| else -> 0
Hindley-Milner type inference means you write less code while getting more safety. Types are inferred automatically, catching errors at compile time.
# No type annotations needed
add-five = add 5
result = map add-five [1, 2, 3]
# Type: List[Int] β List[Int]
Track side effects at the type level. Know exactly what your functions doβpure computation, I/O, network calls, or state mutations.
# Effects tracked automatically
pure-fn = fn(x) => mul x 2
# Effect: Pure
io-fn = fn(msg) => writeln-stdout msg
# Effect: IO
Compile to optimized C code or run directly with the evaluator. Get the performance of native binaries with zero runtime dependencies.
# Compile to native binary
$ ./kitc hello.kit -o hello.c
$ cc -O2 -o hello hello.c
$ ./hello
Hello, World!
Algebraic data types with powerful pattern matching. Exhaustiveness checking ensures you handle all cases.
type option a = some a | none
unwrap = fn(opt) =>
match opt
| some x -> x
| none -> 0
Fault-tolerant concurrent systems with lightweight actors. Message passing and supervision strategies included.
# Spawn concurrent actors
worker = spawn (fn() =>
writeln-stdout "Processing..."
)
send worker "task"
Call Rust functions via FFI. Leverage the entire Rust ecosystem for performance-critical code or existing libraries.
extern "lib.dylib" {
parse_json: fn(String) -> Value
}
data = parse_json "{\"x\":42}"
Complete developer toolchain: project scaffolding, automatic formatting, documentation generation, incremental compilation, and Rust-quality error messages with "Did you mean?" suggestions.
# Complete tooling suite
$ kit new my-project
$ kit format src/*.kit
$ kit docs --format html
$ kit run src/main.kit
# Error: Unbound variable 'greeet'
# Did you mean 'greet'?
Built-in memory profiler with leak detection, profile-guided JIT optimization, and pluggable GC strategies (RefCount, Mark-Sweep, Hybrid, Manual).
# Built-in memory profiling
profiler-start
data = load-large-dataset
profiler-stop
# Get detailed report
stats = profiler-stats
# Peak: 2.4 MB, 0 leaks
Work-stealing task scheduler for parallel execution. Process large datasets efficiently with built-in parallelism and channels for communication.
# Parallel task execution
tasks = map (fn(x) =>
spawn-task (fn() => process x)
) large-dataset
results = join-all tasks
# All tasks run in parallel
Kit provides a complete, Gleam-inspired toolchain with everything you need for professional development. No third-party tools requiredβit's all built-in.
kit newScaffold new projects instantly with templates for libraries, binaries, or FFI projects. Includes git initialization, CI/CD workflows, and comprehensive README.
$ kit new my-lib --template lib
kit format
Automatic code formatting with intelligent layout decisions. Keep your codebase consistent and
readable. Works great in CI/CD with --check mode.
$ kit format src/*.kit
kit docsGenerate beautiful HTML or Markdown documentation from doc comments. Automatic linking, parameter parsing, and example extraction included.
$ kit docs --format html
kit configValidate and inspect project configuration (kit.toml). Get helpful error messages for invalid settings with automatic defaults for common options.
$ kit config validate
kit cacheIncremental compilation with xxHash-based fingerprinting. Skip unchanged modules for 10-100x faster rebuild times on large projects.
$ kit cache stats
Rust-quality error messages with "Did you mean?" suggestions using edit-distance analysis. Context-aware type errors explain exactly what went wrong.
Error: Unbound variable 'greeet'
Did you mean 'greet'?
Kit comes with extensive library support out of the box. No need to search for third-party packagesβeverything you need for modern development is ready to use.
Complete AI agent framework with 100% parity with Google's ADK for Go. Build production-grade agents with memory, sessions, and multi-model support.
All libraries are seamlessly integrated with Kit's type system and effect tracking. Start building immediately without configuration overhead.
# Functional programming essentials
# First-class functions
square = fn(x) => mul x x
add-one = fn(x) => add x 1
# Function composition
numbers = [1, 2, 3, 4, 5]
doubled = map (fn(x) => mul x 2) numbers
# => [2, 4, 6, 8, 10]
evens = filter (fn(x) => mod x 2) numbers
# => [2, 4]
sum = reduce (fn(acc) => fn(x) => add acc x) 0 numbers
# => 15
Kit makes functional programming natural and intuitive. Higher-order functions like
map, filter, and reduce are built-in and optimized.
# Define custom algebraic data types
type result a b =
| ok a
| error b
# Safe division with error handling
safe-div = fn(x) => fn(y) =>
match y
| 0 -> error "Division by zero"
| else -> ok (div x y)
# Pattern match on results
result = safe-div 10 2
match result
| ok value -> writeln-stdout value
| error msg -> writeln-stderr msg
Define custom types with multiple constructors. Pattern matching ensures exhaustive handling of all cases at compile time.
option, result)# Data processing pipeline
data = [
{name: "Alice", age: 30, score: 95},
{name: "Bob", age: 25, score: 87},
{name: "Carol", age: 35, score: 92}
]
# Filter and transform in one pipeline
top-performers =
data
|> filter (fn(p) => p.score > 90)
|> map (fn(p) => p.name)
|> join ", "
# => "Alice, Carol"
# Complex aggregations
avg-score =
data
|> map (fn(p) => p.score)
|> reduce add 0
|> div (count data)
Chain operations elegantly with pipeline operators. Transform, filter, and aggregate data with clear, readable code.
|># Actor-based concurrency
# Spawn a worker actor
worker = spawn (fn() =>
loop {
receive
| "task" data ->
result = process data
send sender result
| "stop" ->
break
}
)
# Parallel map over collections
results = parallel-map expensive-fn large-dataset
# Async/await for I/O
data = await http-get "https://api.example.com"
parsed = json-parse data
Built-in support for concurrent actors, parallel processing, and async I/O. Fault-tolerant by design with supervision strategies.
git clone https://gitlab.com/kit-lang/kit-lang
cd kit-lang
./scripts/build-rust.sh
# hello.kit
writeln-stdout "Hello, Kit!"
double = fn(x) => mul x 2
result = map double [1, 2, 3]
writeln-stdout result
# Run directly with evaluator
kit run hello.kit
# Or compile to native binary
kit cgen hello.kit -o hello.c
cc -O2 -o hello hello.c
./hello
Supported platforms: macOS and Linux
Current version: 1.0.0-alpha β’ Rust 1.70+ required
Ask questions, share projects, and discuss language design with the Kit community.
Join Discussions βStay updated with language development, release notes, and community highlights.
Read Blog βComplete reference for Kit's syntax, semantics, and type system
Step-by-step tutorial for new users to learn Kit
Reference for all 165+ built-in functions with examples
Complete toolkit: project scaffolding, formatting, docs, incremental builds, and more
How to call Rust code from Kit via FFI
Real-world code examples and patterns