Systems language · built AI-first

The Logos Programming Language

A compiled, statically-typed systems language with ownership, traits, generics, and pattern matching — and Writ, a code-and-data substrate built into the grammar itself.

package writ_example;
use logos.lang.writ.container;   // Writ
use logos.mem.writ.parser;       // parse_writ
use logos.mem.writ.stringify;    // stringify
use logos.std.io;

fn main() -> i32 {
    // Parse a document, then render it back — one call each.
    let doc: Writ = parse_writ(r#"
        {
            name:"widget",
            version:42,
            active:true,
            tags:["fast","safe"],
            i32_array: <I32> [1,2,3,4]
        }
    "#);
    if doc.root().is_null() { return 1; }   // null root == parse error
    let s: String = stringify(doc.root());
    println(s.as_str());
    return 0;
}
🤖

AI-first ergonomics

Syntax and semantics chosen so models generate and verify code reliably. A Rust-like surface sits in the sweet spot models handle best.

🧬

Code + data unified

Writ is built into the language: @{…} / @[…] are literal grammar forms, capture is type-checked at sema, view types carry lifetimes through the borrow checker.

⚙️

Ownership & borrowing

Affine types, &/&mut references, lifetimes, traits, generics with monomorphization, and exhaustive pattern matching.

🚀

Native AOT pipeline

The logosc compiler covers parse, sema, borrow checking, monomorphization, MLIR generation, and LLVM lowering to native code.

🧪

Verification-oriented

Broad diagnostics, runtime tracing, and a strong test culture — ~800 passing tests and ~165 diagnostic tests gate every merge.

🔗

Pragmatic interop

C/C++ FFI exists where you need it, but Logos is the primary programming model — not a framework layer over something else.

Build the compiler and run your first program →