A functional language that combines
static safety with dynamic flexibility

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
hello.kit
# 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

Why Kit?

πŸ”

Powerful Type Inference

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]
⚑

Effect System

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
πŸš€

Native Compilation

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!
🎯

Advanced Pattern Matching

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
🎭

Actor Model Concurrency

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"
πŸ¦€

Rust Interoperability

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}"
πŸ› οΈ

Professional-Grade Tooling

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'?
⚑

Memory & Performance

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
πŸ”€

Parallel Execution

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

Modern Developer Experience

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 new

Scaffold 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 docs

Generate beautiful HTML or Markdown documentation from doc comments. Automatic linking, parameter parsing, and example extraction included.

$ kit docs --format html

βš™οΈ kit config

Validate and inspect project configuration (kit.toml). Get helpful error messages for invalid settings with automatic defaults for common options.

$ kit config validate

⚑ kit cache

Incremental compilation with xxHash-based fingerprinting. Skip unchanged modules for 10-100x faster rebuild times on large projects.

$ kit cache stats

πŸ” Smart Errors

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'?

Batteries Included

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.

πŸ€– AI Agent Development

Agent Developer Kit (ADK) Multi-Agent Systems OpenAI Anthropic (Claude) Google (Gemini) Local Models Tool Integration Workflow Orchestration

Complete AI agent framework with 100% parity with Google's ADK for Go. Build production-grade agents with memory, sessions, and multi-model support.

πŸ—„οΈ Databases & Storage

PostgreSQL MySQL MariaDB SQLite SQL Server Oracle MongoDB Redis DuckDB ORM

πŸ“Š Data Processing & Analytics

Polars Apache Arrow Kafka Vector DB

☁️ Cloud Platforms

AWS Google Cloud Firebase

🎨 Graphics & Multimedia

OpenGL SDL Cairo Skia OpenCV FFmpeg

🌐 Web & Networking

HTTP Client/Server gRPC Authentication OAuth

πŸ” Security & AI

Libsodium Cryptography AI Integrations

πŸ› οΈ Utilities

Async I/O Regular Expressions Timezone Support Parsers

All libraries are seamlessly integrated with Kit's type system and effect tracking. Start building immediately without configuration overhead.

See Kit in Action

# 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

Functional Programming Essentials

Kit makes functional programming natural and intuitive. Higher-order functions like map, filter, and reduce are built-in and optimized.

  • First-class functions with closures
  • Currying and partial application
  • Immutable data structures
  • Expression-oriented design
# 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

Algebraic Data Types

Define custom types with multiple constructors. Pattern matching ensures exhaustive handling of all cases at compile time.

  • Sum types (e.g., option, result)
  • Generic type parameters
  • Recursive types for lists and trees
  • Exhaustiveness checking
# 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)

Data Processing Pipelines

Chain operations elegantly with pipeline operators. Transform, filter, and aggregate data with clear, readable code.

  • Pipeline operator |>
  • Lazy evaluation support
  • Structural sharing for efficiency
  • Rich standard library
# 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

Concurrent & Parallel Execution

Built-in support for concurrent actors, parallel processing, and async I/O. Fault-tolerant by design with supervision strategies.

  • Lightweight green threads
  • Message passing with channels
  • Async/await syntax
  • Supervisor strategies

Get Started in Minutes

1

Install Kit

git clone https://gitlab.com/kit-lang/kit-lang
cd kit-lang
./scripts/build-rust.sh
2

Write Your First Program

# hello.kit
writeln-stdout "Hello, Kit!"

double = fn(x) => mul x 2
result = map double [1, 2, 3]
writeln-stdout result
3

Run or Compile

# 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

Join the Community

πŸ’¬

Discussion Forum

Ask questions, share projects, and discuss language design with the Kit community.

Join Discussions β†’

GitLab

Contribute to the language, report issues, or explore the source code.

View on GitLab β†’
πŸ“š

Documentation

Comprehensive guides, API reference, and tutorials to learn Kit.

Read the Docs β†’

Blog & Updates

Stay updated with language development, release notes, and community highlights.

Read Blog β†’

Documentation