Learning roadmap
This topic is not available in the selected language or version. Showing the start of this section.
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.
| Step | Chapter | What you can do |
|---|---|---|
| 1 | Installing Xen | Run the compiler on your computer |
| 2 | Your first program | Print, check, and build |
| 3 | Variables and values | Name, change, and calculate values |
| 4 | Data types and conversions | Choose types and convert numbers |
| 5 | Functions and control flow | Choose paths and repeat work |
| 6 | Strings and collections | Store and process multiple values |
| 7 | Structs and enums | Group data and distinguish states |
| 8 | Missing values and errors | Handle failures as values |
| 9 | Working with multiple files | Split a program into modules |
| 10 | Count words in a file | Connect arguments, files, and error handling |
| 11 | Testing your code | Check 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.
| Step | Chapter | What you control |
|---|---|---|
| 12 | Scope modes | Function/block explc and block opt boundaries |
| 13 | Copies, moves, and references | Independent copies, borrowing, and ownership transfer |
| 14 | Generics and type inference | Type arguments and reusable code shapes |
| 15 | Slices and iterators | Temporary views, lazy transformations, and consumption |
| 16 | Box and recursive data | Ownership 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.
Read, build, and check
Section titled “Read, build, and check”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.