Skip to content
Xen / docs

Search documentation

English · v0.1.0-demo.3

Type to search the documentation.

    한국어
    Xen / learn v0.1.0-demo.3

    Learning roadmap

    Start by building a small program, then learn to control its behavior where you need to. If you are new to programming, follow the basic path in order. Every page links to a Coding Class with exercises, program projects, and debugging tasks.

    Basics · Build a program with default behavior

    Section titled “Basics · Build a program with default behavior”

    Use variables, functions, conditions, and loops before choosing reference annotations or optimization settings. The goal is a working file tool with error handling and tests.

    StepChapterWhat you can do
    1Installing XenRun the compiler on your computer
    2Your first programPrint, check, and build
    3Variables and valuesName, change, and calculate values
    4Data types and conversionsChoose types and convert numbers
    5Functions and control flowChoose paths and repeat work
    6Strings and collectionsStore and process multiple values
    7Structs and enumsGroup data and distinguish states
    8Missing values and errorsHandle failures as values
    9Working with multiple filesSplit a program into modules
    10Count words in a fileConnect arguments, files, and error handling
    11Testing your codeCheck ordinary inputs and boundaries
    fn main() {
    let greeting = "Hello, Xen!";
    println(greeting);
    }

    Begin with this much. Xen produces static Linux executables; these pages target v0.1.0-demo.3. Install Xen, then run your first program.

    Advanced · Take control starting with scope modes

    Section titled “Advanced · Take control starting with scope modes”

    Scope modes mark the boundary between the basic and advanced paths. Continue when you can understand and test the basic program. Decide whether you need an independent copy, access to the original, or ownership transfer, then enable the required features in the appropriate scope.

    StepChapterWhat you control
    12Scope modesFunction/block explc and block opt boundaries
    13Copies, moves, and referencesIndependent copies, borrowing, and ownership transfer
    14Generics and type inferenceType arguments and reusable code shapes
    15Slices and iteratorsTemporary views, lazy transformations, and consumption
    16Box and recursive dataOwnership of recursive links and termination

    explc enables explicit references; opt marks blocks for optimization. Learn each feature together with its restrictions. For raw memory, atomics, external calls, syscalls, and assembly, see Low-level operations in bb.

    Coding Class has a companion for every Learn page, including this overview. Implement the requirements first, then use hints and completion criteria to check your work. Look up precise rules in Reference and complete source and output in Examples.

    Syntax and APIs may change. Linux x86-64 is supported; AArch64 is experimental. See support and limitations.