Introduction

insty is a statically-typed, natively-compiled systems language with a self-contained x86-64 backend, a real package manager, and first-class OS-dev support.

insty is a statically-typed systems language that compiles straight to native x86-64 with a from-scratch backend โ€” no LLVM. It ships a real package manager (cloud), a language server, and first-class support for operating-system development.

Why insty

  • Native and self-contained. The compiler emits ELF, PE, and Mach-O objects directly and links with lld. No LLVM, no massive toolchain to install.
  • Systems-grade. Pointers, slices, unsafe blocks, inline assembly, volatile MMIO, atomics, and freestanding/kernel targets โ€” insty was built to write an operating system (InstantOS).
  • Modern types. Sum types with exhaustive match, monomorphized generics, slices, and string interpolation.
  • Real tooling. A cloud package manager, an insty-lsp language server, and a VS Code extension.

A taste

module main

enum Shape {
    Circle(i32),
    Rect(i32, i32)
}

fun area(Shape s) -> i32 {
    match s {
        Circle(r)  => return 3 * r * r
        Rect(w, h) => return w * h
    }
    return 0
}

fun main() -> i32 {
    Shape s = Shape.Rect(4, 5)
    return area(s)      // 20
}

Where to next

insty source files use the .ins extension. Try any snippet in the playground.