Install

Windows Linux / Macos
curl -sSL https://valk-lang.dev/install.sh | bash
📋

Example

use valk:http

fn handler(req: http:Request) http:Response {
    return http:Response.html("Hello world!")
}

fn main() {
    let host = "127.0.0.1"
    let port : u16 = 9000
    let s = http:Server.new(host, port, handler) ! {
        println("Failed to initialize http server")
        return
    }
    println("HTTP server - http://" + host + ":" + port)
    s.start()
}

Features

  • Fast run/compile time
  • Strict type system 👮
  • Generics 🧩
  • Coroutines 🫧
  • Package manager 📦
  • No undefined behaviour
  • Cross compiling

Amazing performance

Valk can compete with the fastest languages out there. Its stateful garbage collector is designed for predictable, low-overhead memory management. More info: benchmarks on GitHub.

Valk
# time ./valk/objtree 20
real 0m2.130s
user 0m2.125s
sys 0m0.005s
Rust
# time ./rust/objtree 20
real 0m3.611s
user 0m3.606s
sys 0m0.005s
Go
# time ./go/objtree 20
real 0m6.017s
user 0m6.012s
sys 0m0.005s

Why did we make Valk?

We wanted a programming language with a practical balance between simplicity and performance. Valk combines a concise syntax with native compilation, memory safety, and a stateful garbage collector.

  • A stateful garbage collector without stop-the-world mark-and-sweep cycles
  • Expressive generics and concise error handling
  • A dedicated simple package manager
  • Clear public, readonly, and private access controls
  • Thread-local storage and coroutines
  • Interoperability with C libraries

Language details

  • Open source under the MIT license
  • Native code generation with an LLVM backend
  • Self-hosted compiler
  • Stateful garbage collection
  • Semi-stackful coroutines
  • Cross-compilation for Windows, Linux, and macOS

If you want to know more about the language, join our discord and just ask. ✌️