Speichersicherer Systemcode.Ohne Garbage Collector.
Xu prüft Eigentum und Ausleihen zur Compile-Zeit und kompiliert Ahead-of-Time in nativen Maschinencode sowie WebAssembly. Deterministische Freigabe, typisierte Kanäle und M:N-Coroutinen — gesteuert über einen einzigen xu-Befehl.
@main
fn square(input chan int, output chan int) {
for i in 0:5 {
v := <-input
output <- v * v
}
}
fn main() int {
nums := chan int{cap: 5}
squares := chan int{cap: 5}
xu square(nums, squares)
for v in 1:6 { nums <- v }
for i in 0:5 { println(<-squares) }
<< 0
}
$ xu run pipeline.xu
curl -fsSL https://xulang.org/install.sh | bash -s -- --online --version 0.16.0 --yes
& ([scriptblock]::Create((irm https://xulang.org/install.ps1))) -Online -Version "0.16.0"
Gemessen, nicht behauptet
Im Benchmark gegen C, Rust, Go und Swift
Geometrisches Mittel der Median-Laufzeit von Xu geteilt durch die der jeweiligen Vergleichssprache über 121 Workloads auf macOS ARM64 (Apple Silicon), gemessen am 2026-11-29. Unter 1.00× bedeutet, dass Xu schneller war.
Native Binary-Größenspanne (KiB)
Full-Stack-Systemfähigkeiten: Vom Bare-Metal-Kernel und MCU bis zu lokalem AI & Apps
Eine Sprache und einheitliche xu-Toolchain für AOT-Optimierung, Zero-GC-Speichersicherheit, M:N-Nebenläufigkeit, Embedded-Funkstacks, reines Xu-AI, native UI, Mobile und C-FFI.
Betriebssystem- & Kernel-Entwicklung
Standalone-Kernel und UEFI-Firmware mit --profile=freestanding und xu init --baremetal: 25 #core/*-Module, MMU, VirtIO, GICv3 / PSCI / SBI, @interrupt, @repr("C") und isoliertes unsafe-MMIO.
AI-Entwicklung, lokale Inferenz & Fine-Tuning
47 #tensor-Primitive und --tensor-fusion K-Quant-SIMD für llm_engine (--threads N, VLM, GBNF/Schema, LoRA/RLVR), llm_metal / cuda_native / vulkan_native sowie MCP, A2A und GraphRAG.
Eigener AOT-Compiler, typisiertes MIR & WebAssembly
Ohne LLVM oder externen C-Compiler: Self-Hosting auf 6 Host-Zielen plus LoongArch64, RISC-V, wasm32-wasi und Bare-Metal mit MIR-Batches A–T, SLP, --pgo und Mach-O/ELF/PE-Hardening.
$ xu build app.xu --pgo app.pgo
$ xu build app.xu --target wasm32-wasi -o app.wasm
Ziele & Implementierungsstatus
Ownership ohne Lifetime-Annotationen & Zero-GC
Compiler-inferiertes Einzel-Ownership mit geteilten (&T) und exklusiven ($&T) Borrows ohne manuelle 'a-Annotationen. Deterministische Freigabe ohne GC-Pausen; *raw T nur in unsafe.
fn push(buf $&[]int, v int)
fn sum(buf &[]int) int
Speichersicherheitsmodell
Symbolischer Kontrollfluss & ohne Funktionsfärbung
Standardmäßig unveränderlich ohne Semikolons oder Bedingungsklammern; << Return, >> Throw, >>> Fehlerfluss ohne Result/? oder async/await-Färbung.
M:N-Koroutinen, 16-KiB-Stacks & getypte Channels
Leichte 16-KiB-Koroutinen via xu f() mit standardmäßig aktivem M:N-Scheduler unter Linux/macOS, #sync/pool, SPSC-Eliminierung und select.
Embedded-MCUs, ESP32 & Funkprotokoll-Stacks
Ziele für thumbv7em-none, riscv32imac-none und none-xtensa samt #embedded/{chips/esp32,bluetooth,wifi,display,mqtt} (Wi-Fi/BLE-Koexistenz experimentell).
Async-Netzwerk, reines Xu-TLS 1.3 & Kryptographie
epoll/kqueue/WSAPoll, HTTP/2 Huffman, WebSocket, SOCK_RAW, reines TLS 1.3 + ACME, AES/SHA-NI, SM2/3/4/9/ZUC/GMTLS sowie kontrahiertes #crypto/subtle.
Plattformübergreifende GPU, Windowing, UI & WebView
#gpu, #window und #ui/* bieten Headless-GPU-Compute/Render-Pässe, Retained-Layout, 46 Widgets (:focus-visible), 30 Diagramme und WebView2/WebKit.
iOS-/Android-Mobile-Apps & GPU-Game-Host
Erzeugt mit xu build --phone ARM64-iOS/Android-Projekte inkl. Safe-Area, IME, Haptik sowie --phone-profile game und #app-Asset-Bundling.
Module, Span-Arena-XUN, SQL & 50 Pakete
Reproduzierbares xu.xun/xu.lock/--frozen + Ed25519 XUSUMDB, Span-Arena-XUN, #database/sql, reines dlopen-SQLite und 50 DB-/AI-Pakete.
Bidirektionale C-FFI, .xulib & #xacp-Kern
Multi-Target-.xulib mit xu native, C-Header via xu cbind, --shared-Libraries (Bitfields/Unions/Callbacks) und #xacp-Steuerungskern (Native-UI unbestätigt).
Einheitliche CLI, DWARF-Debug, LSP & Live-Docs
Eine xu-Binary für Build, Test, debug (LLDB/GDB & DWARF-Typen), symbolische Backtraces, doc --serve, map-Mermaid-Graphen, xu-lsp und GUI-Setup.
Vollständiger Technik-Atlas
Durchsuchen Sie Xu 0.16.0 nach sechs technischen Domänen: Compiler-Pässe, Sprache & Sicherheit, 192 Stdlib-Pakete, Bare-Metal/MCU, AI/GPU und Toolchain.
Compiler-Backend & Optimierungspipeline
Ziele & Status- Reiner Xu-Self-Hosting-Fixpunkt Ohne LLVM oder C-Compiler; alle 6 Tier-1-Plattformen bestehen die Self-Hosting-Fixpunktprüfung.
- Typisierte MIR-Batches A–T IPA ModRef Alias-Verfeinerung, Cold/
.okp-Inlining, Heap-/Divisor-BCE und Multi-Push-Reservierung. - SIMD-Fusion & Loop-Tiling SLP-Vektorisierung, MEMOIR-GEMM-Tiling & SROA sowie ARM64 NEON/SDOT und x64 SSE2/SSSE3.
- PGO & Low-Level-Codegen
--pgoExt-TSP Block-Layout, ARM64 LFTR/NZCV-Reuse sowie x64cmov,MULHund Inline-Atomics. - Natives Binary-Hardening Mach-O
LC_CODE_SIGNATURE&__DATA_CONST, ELF W^X/PIE/Full RELRO/CET, PE32+ W^X &.pdata. - Verifikation & Konformität Pass-Validator
XU_VERIFY_MIR=1,XU_DUMP_MIR, Differential-Fuzzing und v1.0-Konformitätsgates.
Sprachdesign, Speichersicherheit & Nebenläufigkeit
Speicher- & Nebenläufigkeitsspec- Null Lifetime-Annotationen Inferiertes Ownership mit geteiltem
&T(inkl.$&T-Downgrade) und exklusivem$&Tohne'a. - Symbolischer Fluss & Fehler
<<Return,>>Throw,<<<Exit, verpflichtendes>>> (err) {};0.15.0gibtorfrei. - Keine Funktionsfärbung & Generics Koroutinen ohne
async/await-Färbung und monomorphisierte Generics ohne Parameterlimit. - Isoliertes
unsafeKein globaler veränderlicher Zustand, keinreflect, strikte Bounds/Div-Zero-Checks;*raw Tnur inunsafe {}. - M:N-Scheduler & 16-KiB-Stacks Call-Graph-Stackanalyse ermöglicht 16-KiB-Mikrokoroutinen, M:N-Scheduling (Linux/macOS) und
#sync/pool. - Channel-Optimierung &
select1:1-SPSC-Eliminierung, direktes Stack-Rendezvous, Fast-Path-Buffer-Channels undselect.
192 Batterien-inklusive Stdlib-Module
API-Index öffnen- Span-Arena XUN & Formate Zero-Slice Span-Arena
#encoding/xun(XUN v0.2.0-dev) sowie JSON, TOML, XML, CSV, ASN.1, PEM, Binary. - Asynchrone Netzprotokolle
epoll/kqueue/WSAPoll, HTTP/1.1 & HTTP/2 Huffman, WebSocket, Pools, SMTP, APNS undSOCK_RAW. - TLS 1.3 & Kryptographie Reines Xu TLS 1.3/X25519/ACME, Hardware-AES/SHA-NI, SM2/3/4/9/ZUC/GMTLS (unzifiziert) und
#crypto/subtle. - Kompression, Medien & Fonts Natives
zstd,gzip,zlib,bzip2,tar/zip, PNG/JPEG/GIF und hostloses#ui/fontTTF/OTF. - Tensoren, BigInt & Templates 47
#tensor-Primitive,#tileGEMM,#math/big, budgetiertes#regexpund#html/template. - OS-Pipes, SQL & Telemetrie Bidirektionale
#os/exec-Pipes/Signale, TZif,#log/slog,#context,#rate,#database/sqlund#testing.
Bare-Metal, Embedded MCUs & Zielplattformen
OS- & Bare-Metal-Doku- Freestanding & Kernel-Scaffold
--profile=freestandingundxu init --baremetalerzeugen Minikernel (~1,9–2,4 KB ELF) samt QEMU-Skript. - 25
#core/*-Kernelsubsysteme Umfasstmmu,acpi,uefi,pci(BAR/MSI-X),fdt,virtio,net,disk,uart,backtrace. - Interrupts & Kontextwechsel
@interrupt,@repr("C"), RAII-IrqSpinlock,Semaphore, 192BTaskContextund GICv3/PSCI/SBI. - MCUs & Funkprotokolle
thumbv7em-none,riscv32imac-none,none-xtensamit#embedded/{chips/esp32,bluetooth,wifi,display,mqtt}(Koexistenz experimentell). - Breite Cross-Compilation macOS, Linux (inkl. LoongArch64, RISC-V 64, ARM32), Windows und
wasm32-wasinativ integriert. - Desktop- & Mobile-Bundling macOS
.app, Windows.exe, Linux ELF sowiexu build --phonefür iOS/Android & SDL-GPU-Spielehost (#app).
AI-Inferenz, Multi-Backend-GPU & 50 Pakete
Paket-Matrix- Multithreaded Inferenz & VLM
llm_engineunterstützt GGUF/SafeTensors, MLA/MoE/SSM, VLMmmproj.gguf, GBNF/Schema-Trie & Speculative Decoding. - Reines Xu Fine-Tuning & Serving LoRA-SFT (Checkpoints), DPO, GRPO, RLVR, Distillation sowie batched OpenAI/Anthropic/Ollama-HTTP-Serving.
- Einheitlicher Multi-GPU-Stack
gpusteuertllm_metal/metal(176 Symbole/FlashAttention),dlopencuda_nativeund SPIR-Vvulkan_native. - LLM-Gateways & Agent-Protokolle
openai(11 Presets),anthropic,gemini,cohere, Failover-gateway,agentSwarm/StateGraph,mcpunda2a. - RAG, Guardrails & Evaluation
rag(PgVectorPool/SQLite/Qdrant/GraphRAG),guardrails,eval(Ragas/Schema) undsynth. - 30 Datenbank- & Infra-Treiber MySQL, Postgres, reines
dlopen-SQLite, ClickHouse, MongoDB, Redis, Kafka, NATS, S3, gRPC, etcd, Prometheus.
FFI, Steuerprotokoll & Toolchain
CLI-Referenz- Bidirektionale C-FFI & Shared Libs
xu nativebaut Multi-Target-.xulib,xu cbinderstellt C-Header-Assertions,--sharedexportiert C-ABI-Bibliotheken. - Reproduzierbare Supply Chain
xu.xun, MVS,sha256-tree-v1xu.lock,vendor/,--frozenund Ed25519 XUSUMDB-Verifikation. #xacpSteuerungskern Transportunabhängiger Sicherheits-/Framing-/UI-Aufnahmekern (xu xacp; native Laufzeitabnahme noch offen).- DWARF-Debug, Live-Docs & Flow Symbolische Backtraces & DWARF-Typen (
0.15.0),xu debug,xu doc --serveundxu mapMermaid. - Natives
xu-lsp& WASM Playground VS-Code/Cursor-Erweiterung (Completion, Diagnose, Rename, Quick-Fix) plus 75 Beispiele im Browser-Playground. - GUI-Setup & Atomare Updates Abhängigkeitsfreier nativer
xu setup-Assistent,xu doctorund SHA-256-verifiziertesxu up.
Experience XU in Browser (WebAssembly Playground)
Compile and execute Xu code instantly in your browser without local installation. The runner is written in Xu and self-compiled to WASM, covering lexical analysis, borrow checking, and runtime execution.
Start with the entry function and standard output, modify text, and run again.
Run a UI example to display its canvas here.
// Standard output and diagnostics will be shown here...
Explore Core Features
Continue exploring standard library and native execution capabilities with the local compiler.
Open-Source-Ökosystem
Produktive Engines, Server und Pakete in reinem Xu
Nexus Engine
Plattformübergreifende 2D/3D-Spiel-Engine in reinem Xu auf #gpu und #window: Szenenbaum, PBR & CSM/PCF-Schatten, 3D-Dreieckskollision & Starrkörperphysik, GLB/OBJ/STL-Import, Audiomixer und nativer Editor.
Fatext
API-first KI-Agenten-Plattform, E2EE-DM/Room-Relay, P2P-Signaling-Hub & Mail-Bridge ohne Datenbank oder Client-JS — als Einzelbinary in reinem Xu mit integriertem TLS 1.3 + ACME v2 Auto-TLS, SSR & SSE.
fatext.com besuchenOfficial Packages
github.com/xulang-org/packages (v1.17.0) umfasst Datenbanken, Caches & Messaging sowie OpenAI/Anthropic/Gemini/Gateway, MCP/A2A/Agent/GraphRAG und Multi-Backend-GPU (gpu, llm_metal, cuda_native, vulkan_native).
Native & WebAssembly Compilation Targets
The compiler generates code for the following targets. For downloadable SDK archives, see the Download page.
Code generation, SDK availability, and tested runtime behavior are separate levels of support. Runtime and GUI paths without target-machine acceptance results remain unverified. See Status & Limitations and per-package notes; native modules and desktop builds may require host libraries and toolchains.
macOS
arm64 (Native)x64
Linux
arm64x64loongarch64riscv64arm32
Windows
x64 (PE AOT)arm64
WebAssembly
wasm32 / WASI
Bare-Metal
x86_64aarch64riscv64 ELF
Xu mit einem Befehl installieren
Das Installationsskript erkennt Ihre CPU-Architektur automatisch, trägt PATH dauerhaft ein und liefert das vollständige SDK samt Standardbibliothek mit.
curl -fsSL https://xulang.org/install.sh | bash -s -- --online --version 0.16.0 --yesFrequently Asked Questions (FAQ)
What is the Xu programming language?
Xu is a statically typed systems language that compiles ahead of time to native code. It combines ownership and borrow checking with lightweight coroutines and typed channels for command-line tools, network services, and desktop applications.
Does Xu use a garbage collector (GC)?
No. Compile-time ownership and borrow checking govern resource lifetimes, with deterministic cleanup at scope exit and no runtime garbage collector. See Ownership & Borrowing and the FAQ on shared-state synchronization and native/FFI safety boundaries.
Does Xu support native desktop UI?
How does Xu perform?
The benchmark dashboard compares Xu, C, Rust, Go, and Swift across 102 groups with 121 workload variants on six ARM64 / x86-64 platforms, with measured runtime, memory, binary size, and source records.
Xu 0.16.0 erzwingt Modul-const am Dateianfang, liefert die Batches Q–T (Lock-free-MPMC-Kanäle, ARM64-30-FP-Regalloc, modularer M:N-Scheduler, SLP-Multi-Use-DAG-Vektorisierung, BCE), ergänzt #simd, #bytes/span, #gpu/video, #ffi/dl, #os/mmap, ESP32-C3 ELF32 --emit-obj und #core/{nvme,ahci,rtc,xhci} und besteht alle 121 Benchmarks auf sechs Plattformen (726/726, 0 Fehler).