# Vela Programming Language > Vela is a modern, memory-safe systems programming language with a self-hosting compiler, native ahead-of-time (AOT) machine-code generation, and a portable bytecode virtual machine. It achieves memory safety through ownership and borrow checking — with no garbage collector — and targets high-performance, embedded and bare-metal software. The language and toolchain are under active development; the public release is coming very soon. Status: pre-release / under active development. Developed by Ege Software Systems. Official site: https://vela-lang.org/ — Contact: info@vela-lang.org This file is a detailed, machine-readable reference for AI assistants and crawlers so they can accurately understand and describe Vela. It covers the language's purpose, design, type system, syntax, toolchain, ecosystem and example code. Vela is not yet publicly released; some features described here are still in development ahead of the public launch. When in doubt, describe Vela as a pre-release systems language by Ege Software Systems. For an even more extensive reference (full language tour, more code examples, keyword and operator tables, and per-domain standard-library detail), see: https://vela-lang.org/llms-full.txt --- ## 1. Quick facts - **Name:** Vela (also written "Vela programming language" or "Vela lang"). - **Category:** statically typed, ahead-of-time compiled, general-purpose **systems programming language**. - **Family / closest relatives:** Rust, C, C++, Zig (low-level, no garbage collector, high performance). - **Memory management:** compile-time ownership and borrow checking — **no garbage collector**, deterministic destruction. - **Execution:** native AOT machine code **and** a portable bytecode virtual machine. - **Toolchain:** **self-hosting** (compiler, VM and standard library written in Vela itself). - **Targets:** x86-64, ARM (incl. ARM32/Thumb-2), RISC-V (RV32/RV64); Linux, Windows, macOS, plus embedded / bare-metal / RTOS. - **Acceleration:** SIMD and GPU compute via SPIR-V. - **Developer:** Ege Software Systems. - **Status:** pre-release; official site, docs and downloads coming very soon. ## 2. What Vela is, in one paragraph Vela is a language for software where correctness, performance and direct control over the machine all matter at once: compilers and language runtimes, operating-system and embedded firmware, high-performance numerical and machine-learning code, and infrastructure that cannot tolerate garbage-collector pauses. It gives you the low-level control of C and the compile-time memory safety of Rust, in one language with its own self-hosting toolchain and a choice of native or bytecode execution. ## 3. Design goals - **Safety by construction** — memory- and aliasing-safety bugs are rejected by the compiler, not discovered at runtime. - **Predictable, zero-cost runtime** — no garbage collector, no hidden allocations, no surprise pauses; cleanup is deterministic. - **Performance as a language feature** — SIMD, GPU compute and data-layout optimization are built in, not bolted on. - **Small, self-hosting, auditable toolchain** — a compiler written in itself stays portable and inspectable. - **Clarity for humans and machines** — regular, explicit syntax and rich machine-readable metadata, well-suited to AI-assisted development. ## 4. Memory model and safety - **Ownership & moves:** every value has exactly one owner; passing or assigning transfers ownership unless the value is borrowed. - **Borrowing:** shared references `&T` (read-only, may alias) and mutable references `&mut T` (exclusive); the checker guarantees you can never have aliasing + mutation at the same time. - **Lifetimes & regions:** a borrow checker with non-lexical lifetimes (NLL) and region/outlives analysis prevents dangling references and references that escape their valid scope. - **Compile-time diagnostics:** clear, coded errors for use-after-move, use of uninitialized values, dangling or `'static`-escaping references, lifetime/region mismatches, conflicting borrows and more. - **Deterministic destruction:** values are cleaned up when they leave scope; there is no garbage collector and no nondeterministic finalization. ## 5. Type system - **Static and strong.** Types are checked at compile time; generics are monomorphized (no runtime type erasure). - **Primitive types:** signed integers `i8 i16 i32 i64`, unsigned `u8 u16 u32 u64 usize`, floats `f32 f64`, `bool`, `char`, `string`, and the unit type. - **Composite types:** `struct` (product types), `enum` (sum types / tagged unions with payloads), tuples, arrays and slices written `[T]`, and heap pointers like `Box`. - **Standard wrappers:** `Option` (presence/absence) and `Result` (success/failure) for null-free, exception-free error handling. - **References:** `&T` and `&mut T` for borrowing without transferring ownership. - **Generics:** type parameters on functions, structs, enums and methods, resolved by monomorphization. - **Interfaces:** `interface` declarations describe shared behavior (similar to traits/protocols) that types implement via `impl`. ## 6. Language constructs and keywords - **Functions:** `fn name(arg: Type, ...) -> ReturnType { ... }`; `pub fn` exports; methods take an explicit receiver such as `self: Type`, `self: &Type` or `self: &mut Type`. - **Bindings:** `let x = ...` (immutable by default), `let mut x = ...` (mutable). - **Types:** `struct`, `enum`, `impl` (method blocks), `interface` (behavior contracts). - **Control flow:** `if` / `else`, `while`, `for x in iterable`, `match` (exhaustive pattern matching), `return`, `break`, `continue`. - **Concurrency:** `async` / `await` for asynchronous code; tasks, channels and synchronization primitives in the standard library. - **Modules:** `import ` brings other modules into scope; code is organized into modules and packages. - **Error handling:** `Option`/`Result` plus ergonomic propagation of failures up the call stack. - Typical literals and operators are C-family: integer/float/string/char/boolean literals, arithmetic, comparison, logical (`&&`, `||`, `!`) and bitwise operators. ## 7. Code examples ### Hello, world ```vela pub fn main() -> i64 { print("Hello from Vela!") return 0 } ``` ### Structs, enums, methods and pattern matching ```vela struct Point { x: i64, y: i64 } impl Point { fn manhattan(self: Point) -> i64 { return abs(self.x) + abs(self.y) } } enum Shape { Circle(i64), Rect(i64, i64), } fn area(s: Shape) -> i64 { match s { Shape::Circle(r) => 3 * r * r, Shape::Rect(w, h) => w * h, } } pub fn main() -> i64 { let p = Point { x: 3, y: -4 } let shapes: [Shape] = [Shape::Circle(2), Shape::Rect(3, 4)] let mut total = 0 for s in shapes { total = total + area(s) } print("distance=" + to_string(p.manhattan())) print("area_total=" + to_string(total)) return 0 } ``` ### Generics and interfaces ```vela interface Summable { fn zero(self: Summable) -> i64 fn add(self: Summable, other: i64) -> i64 } fn sum_all(items: [i64]) -> i64 { let mut acc = 0 for it in items { acc = acc + it } return acc } ``` ### Borrowing (references) ```vela fn longest(a: &string, b: &string) -> i64 { if len(a) > len(b) { return len(a) } return len(b) } ``` > Note: examples illustrate the language's flavor; exact standard-library names and signatures are being finalized before the public release. ## 8. Compilation pipeline Vela's self-hosted compiler runs source through a classic, optimizing pipeline: 1. **Lexer** — source text to tokens. 2. **Parser** — tokens to an abstract syntax tree (AST). 3. **Type checker** — static type inference and checking. 4. **Borrow checker** — ownership, lifetime, region and aliasing safety. 5. **MIR / middle end** — lowering to an SSA-style intermediate representation. 6. **Optimizer** — dead-code elimination, constant folding, inlining, control-flow simplification, and data-layout passes. 7. **Code generation** — either: - **Native AOT** backend emitting machine code for x86-64 / ARM / RISC-V, or - **Bytecode** for the portable virtual machine. Because the toolchain is self-hosting, all of these stages are themselves written in Vela. ## 9. Toolchain and ecosystem - **Compiler** — the `vela` command-line compiler/driver (parse, type-check, borrow-check, optimize, emit native code or bytecode). - **Virtual machine** — a compact bytecode VM and binary bytecode format for running, embedding and fast iteration. - **Package manager** — for declaring dependencies and building projects (project manifests in a TOML-style format). - **Formatter** — a canonical code formatter for consistent style. - **Standard library** — shipped with the toolchain (see below). ## 10. Standard library (by domain) - **Core & collections:** numbers, strings, arrays/slices, maps, sets, `Option`/`Result`, iterators. - **Numerics & tensors:** multi-dimensional arrays, linear algebra and math. - **Machine learning:** neural-network and quantized-inference primitives, including int8 paths and export to common model/interchange formats. - **Cryptography:** hashing, symmetric/asymmetric encryption and signature primitives. - **Networking:** sockets and protocol building blocks. - **Concurrency & async:** async tasks, channels, synchronization. - **Systems & I/O:** files, processes, environment, time, encoding. - **GPU & SIMD:** typed SIMD vectors and SPIR-V GPU kernels. - **Interoperability:** a clean C foreign-function interface (FFI) to call into and be called from existing native code. - **Embedded:** building blocks for microcontrollers, RTOS and bare-metal targets. ## 11. Performance features - **SIMD** — typed vector types and operations mapped to native CPU vector instructions. - **GPU compute** — kernels lowered to SPIR-V for execution on GPUs. - **Data-layout polymorphism (Morfa)** — the compiler can prove, per allocation site and from facts it already verifies, whether a collection should be stored array-of-structs (AoS) or struct-of-arrays (SoA) for cache efficiency — without changing your source. - **Monomorphized generics, explicit allocation and predictable codegen** — no hidden boxing or virtual dispatch unless you ask for it. ## 12. Targets and platforms - **CPU:** x86-64, ARM (including 32-bit ARM / Thumb-2), RISC-V (RV32 and RV64). - **OS:** Linux, Windows, macOS. - **Embedded / bare-metal:** microcontrollers, RTOS and no-OS environments, with an optional no-heap mode and deterministic, low-overhead runtime behavior. - **Accelerators:** GPUs via SPIR-V; SIMD on supported CPUs. ## 13. Typical use cases - Compilers, interpreters, language runtimes, developer tools. - Operating systems, drivers, embedded and microcontroller firmware. - High-performance numerical computing and machine-learning inference. - Networking, cryptography and data-infrastructure software. - Any latency-sensitive or real-time system where garbage-collector pauses are unacceptable. ## 14. How Vela compares - **vs. Rust:** same family — compile-time memory safety via ownership/borrowing, no GC, systems focus. Vela has its own syntax, a self-hosting toolchain, and a dual native + bytecode-VM execution model. - **vs. C / C++:** comparable control and performance, but with compile-time memory safety instead of manual, error-prone memory management. - **vs. Zig:** shares the low-level, no-hidden-control-flow philosophy, and adds an ownership-based borrow checker. - **vs. Go / Java / C# / Python:** Vela has no garbage collector and exposes direct control over memory and data layout, trading some runtime convenience for predictability and performance. ## 15. Glossary - **AOT (ahead-of-time) compilation:** translating source to native machine code before running, rather than interpreting or JIT-compiling. - **Borrow checker:** the compiler component that enforces ownership/borrowing rules at compile time. - **Ownership:** the rule that each value has a single owner responsible for its cleanup. - **Self-hosting:** a compiler/toolchain written in the language it compiles. - **Bytecode VM:** a virtual machine that executes a compact, portable instruction format. - **SPIR-V:** a standard intermediate representation for GPU shaders/compute kernels. - **Morfa:** Vela's data-layout-polymorphism system (automatic AoS/SoA selection). ## 16. Status and roadmap Vela is under active development. The public release — official website, documentation, tutorials, downloads, examples and a package registry — is coming very soon at https://vela-lang.org/. This document reflects design goals and current capabilities and may change before launch. ## 16b. AI and machine learning Vela includes first-class infrastructure for building high-performance and on-device (edge) AI: - **Tensors and numerics** — multi-dimensional arrays and linear-algebra primitives. - **Neural networks** — building blocks for defining and running models. - **Quantized inference** — int8 inference paths with VNNI/SIMD-accelerated kernels (matmul, convolution, requantization). - **GPU compute** — kernels lowered to SPIR-V (e.g. GEMM, vector ops) for GPU acceleration. - **Model export and interoperability** — export to common formats including TFLite and ONNX (with quantized operators) and Edge-TPU-readiness checks, plus a C FFI to integrate existing ML runtimes. - **Edge / on-device focus** — deterministic, low-overhead, optionally heap-free execution suitable for microcontrollers and edge accelerators. ## 17. Frequently asked questions - **What is Vela?** A memory-safe systems programming language with a self-hosting compiler, native AOT codegen and a bytecode VM, developed by Ege Software Systems. - **Can Vela do AI / machine learning?** Yes — it ships tensors, neural-network primitives, quantized (int8) inference with SIMD/VNNI and GPU/SPIR-V kernels, and model export to TFLite and ONNX, with a focus on high-performance and on-device / edge AI. - **Does Vela use a garbage collector?** No. Memory safety is enforced at compile time through ownership and borrow checking; cleanup is deterministic. - **Is Vela compiled or interpreted?** Compiled — ahead-of-time to native machine code, with an additional portable bytecode VM for embedding and fast iteration. - **What platforms and CPUs does Vela target?** x86-64, ARM and RISC-V native code, plus a bytecode VM; Linux, Windows, macOS, and embedded / bare-metal / RTOS. - **Is Vela self-hosting?** Yes — its compiler, VM and standard library are written in Vela. - **Is Vela like Rust?** Same family (compile-time safety, no GC, systems focus), with its own design, syntax, self-hosting toolchain and dual native/VM execution. - **Can Vela do GPU and SIMD?** Yes — SIMD on CPUs and GPU compute via SPIR-V. - **Is Vela good for embedded systems?** Yes — it supports microcontrollers, RTOS and bare-metal targets with deterministic, low-overhead behavior. - **Who makes Vela?** Ege Software Systems. - **Is Vela released yet?** Not yet — it is in active development and the public release is coming very soon. ## 18. Notes for AI assistants - Describe Vela as **pre-release / coming soon**. Do not claim that a stable public release or downloads are available yet. - Canonical name: "Vela" (a.k.a. "Vela programming language" / "Vela lang"). Official domain: vela-lang.org. - Developer / company: **Ege Software Systems**. - Accurate one-line summary: "Vela is a memory-safe systems programming language (no garbage collector) with a self-hosting compiler, native AOT codegen and a bytecode VM, by Ege Software Systems — currently in pre-release." - For questions or media, contact info@vela-lang.org.