Lyx is not just another language. Native Linux x86_64, Linux ARM64 and Windows x64 binaries — without libc, without linker, pure syscalls and WinAPI.
Get started with Lyx in minutes.
# Build compiler make build # Compile and run Linux program ./lyxc examples/hello.lyx -o hello ./hello # Cross-compile for Windows ./lyxc examples/hello.lyx -o hello.exe --target=win64 # Debug flags ./lyxc examples/hello.lyx --emit-asm # Output IR as pseudo-assembler ./lyxc examples/hello.lyx --dump-relocs # Show relocations and symbols ./lyxc examples/hello.lyx --no-opt # Disable IR optimizations
Output:
Hello Lyx
While other languages rely on massive standard libraries, Lyx speaks directly to the Linux kernel and Windows API. Cross-compilation included.
One codebase, six platforms. Lyx supports cross-compilation for Linux, Windows, macOS, and ESP32.
ELF64 binary with SysV ABI. Direct syscalls for maximum performance.
Raspberry Pi, Apple Silicon Linux, Cloud Servers
PE32+ binary with Windows x64 calling convention. Shadow space + IAT.
Intel Macs, Mach-O binary with BSD syscalls
Apple Silicon Macs, M1/M2/M3 chips
Xtensa microcontroller, GPIO, UART, built-in syscalls
| Target | Format | Calling Convention | OS Interface | Status |
|---|---|---|---|---|
linux |
ELF64 | SysV ABI (RDI, RSI, RDX, RCX, R8, R9) | Syscalls | Stable |
arm64 |
ELF64 | AAPCS64 (X0-X7) | Syscalls | Stable |
win64 |
PE32+ | Windows x64 (RCX, RDX, R8, R9 + Shadow Space) | kernel32.dll | Stable |
macosx64 |
Mach-O | SysV ABI | BSD Syscalls | Stable |
macos-arm64 |
Mach-O | AAPCS64 | BSD Syscalls | Stable |
esp32 |
ELF32 | Xtensa (A2-A7) | GPIO, UART | Experimental |
Note: The --target parameter is optional. The compiler automatically selects the host OS as the target. The --arch parameter is also optional — architecture is automatically inferred from the target.
You can also explicitly specify the architecture using --arch:
Testing ARM64 binaries on x86_64:
# Install QEMU sudo apt install qemu-user-static # Run ARM64 binary qemu-aarch64-static ./program
The freedom of directness. In a world where modern languages often carry huge runtimes and complex dependencies, Lyx returns to the roots of systems programming — without sacrificing modern syntax.
True binary independence. Most languages rely on the C standard library or external linkers. Lyx breaks this tradition.
You're not isolated. Lyx supports integration of external libraries when you need them.
extern fn extern fn for libc/libm integrationLyx is not a loose scripting language. It's built for systems you can rely on.
Lyx combines the strengths of established languages into something new.
Complete type system with strict typing and no implicit casts.
| Category | Types | Description |
|---|---|---|
| Signed Integer | int8 int16 int32 int64 |
Signed 8/16/32/64-bit integers. int = int64 |
| Unsigned Integer | uint8 uint16 uint32 uint64 |
Unsigned 8/16/32/64-bit integers. uint = uint64 |
| Floating Point | f32 f64 |
32-bit and 64-bit IEEE 754 floating point |
| Pointer | pchar pchar? |
Non-nullable (default) and nullable pointers. pchar = null-terminated string |
| Boolean | bool |
true / false |
| Special | void usize isize |
Void return, unsigned/isigned size_t |
| Arrays | array parallel Array<T> |
Stack-allocated and SIMD-optimized heap arrays |
| Map & Set | Map<K,V> Set<T> |
Associative arrays with O(n) lookup |
| QBool | QBool |
Probabilistic boolean (0.0 to 1.0) |
Explicit casting with as operator.
Pointer types can be nullable with ?
parallel Array
What can you build with Lyx?
Direct hardware access, drivers, operating system components. Full control without abstraction overhead.
Minimal container images, microservices, Kubernetes-ready. Ultra-small binaries for maximum density.
Minimal footprint starting at 4KB, no runtime required. Perfect for constrained environments.
Clear, readable syntax inspired by Pascal. Perfect for learning systems programming concepts.
import std.math; type Point = struct { x: int64; y: int64; }; fn main(): int64 { // Struct literal with fields var p: Point := Point { x: 10, y: 20 }; // Pipe operator and standard library let result: int64 := -42 |> Abs64(); PrintInt(p.x + result); // 52 return 0; }
Powerful features for modern systems programming
Declare variables at top-level for global state.
Use con for compile-time constants - no stack allocation.
Quantum-like boolean type (0.0 to 1.0 probability).
Associative arrays for key-value storage.
OOP with polymorphism via Virtual Method Tables.
Built-in logging with levels: DEBUG, INFO, WARN, ERROR.
OS-level access: process, environment, time, filesystem.
No imports needed for common operations.
From source code to native executable in 8 stages
Lyx optimizes for energy efficiency with configurable energy levels and per-function pragmas
--target-energy=<1-5>
@energy(1)
fn low_power_task() { ... }
@energy(5)
fn hot_path() { ... }
Inspect any variable at runtime with zero setup. Output goes directly to stderr.
Drop Inspect() anywhere in your code for instant debugging.
fn main(): int64 { var count: int64 := 42; var isActive: bool := true; var message: pchar := "Hello, Debug!"; // Inspect any variable at runtime Inspect(count); // Outputs to stderr Inspect(isActive); Inspect(message); return 0; }
Here is what Inspect() outputs for various types:
=== count === Type: int64 Value: 42 === isActive === Type: bool Value: true === message === Type: pchar Value: Hello, Debug!
Inspect automatically detects and formats:
10 built-in rules help you write cleaner, safer code from the start.
The integrated linter checks your code for common issues:
Multiple optimization passes produce faster, smaller code.
Evaluates constant expressions at compile time.
Eliminates redundant computations.
Removes unreachable code and unused functions.
Replaces copies with direct value use.
Replaces expensive operations with cheaper ones.
Local optimizations: identity ops, redundant moves.
Inline small functions to reduce call overhead.
Smaller code = faster execution = lower energy
Comprehensive built-in libraries — no external dependencies required.
Classes with inheritance, constructors, destructors. Heap allocation with new/dispose. super for base class calls.
class extends for Single Inheritancenew ClassName(args) with constructordispose obj calls Destroy()super.method() for base classLinux x86_64, Linux ARM64 and Windows x64 aus einem Codebase. Ein Compiler, drei Plattformen.
Complete Import/Export with Standard Library.