X-Language Docs
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Your First Program

import std, io;

// A hello world application :)
fn main() -> void {
    io::println("hello, world!");
    return;
}

From this block of code, we can already deduce a lot about the general syntax of the language. X is heavily inspired by the syntax of both Rust and C.