/ Documentation
Documentation

Getting Started

Language Guide

SDL2 and Graphics

CLI Reference

Vexel Documentation

Welcome to the official Vexel language documentation. Vexel is a compiled, garbage-collected programming language with Python-like syntax that targets native machine code through LLVM.

Getting Started

Install Vexel, write your first program, and learn the basics.

Variables and Types

Declare variables, understand built-in types, and work with collections.

Functions

Define functions, use parameters, return values, and write lambdas.

Control Flow

if, elif, else, for loops, while loops, break, and continue.

Structs

Define custom data types, instantiate them, and access fields.

Interfaces

Define interfaces, implement them on structs, and use polymorphism.

Pattern Matching

Use match/case to branch on values and struct types.

SDL2 and Graphics

Open windows, draw shapes, and build a game loop.

CLI Reference

Full reference for the vexel compiler command-line tool.

Quick Example

fn fib(n: int) -> int:
    if n <= 1:
        return n
    return fib(n-1) + fib(n-2)

fn main():
    for i in 0..10:
        print(fib(i))

Run with: vexel run hello.vx