Releases: Luma-Programming-Language/Luma
Luma v0.2.0
Luma v0.2.0 – Cross-Platform, FFI & First-Class Functions
Luma is a systems programming language focused on explicit memory management, fast compilation, and compile-time ownership verification without a borrow checker or garbage collector.
Version 0.2.0 is the largest release since Luma's initial launch, introducing foreign function support, cross-platform development capabilities, first-class function types, significant compiler improvements, and expanded tooling.
What's New
Foreign Function Interface (FFI)
Luma can now call native libraries directly, opening access to existing C libraries and operating system APIs.
#lib_import
Link and call functions from shared libraries:
@link("libc.so.6")
#lib_import("libc")
pub const printf -> fn (fmt: *byte, val: *byte) int;
#lib_import("libc")
pub const malloc -> fn (size: int) *void;
Features:
- Direct access to native libraries
- No wrapper code required
- No generated bindings required
- Simple declaration syntax
The standard library now includes std/libc.lx with bindings for common libc functionality including stdio, stdlib, string, math, and time APIs.
#dll_import
Import functions directly from Windows DLLs:
#dll_import("kernel32.dll", callconv: "stdcall")
pub const CreateFileA -> fn (...) *void;
Features:
- Direct Windows API access
- Support for multiple calling conventions
- Foundation for native Windows development
First-Class Function Types
Functions are now real types within the language.
let op: fn (int, int) int = add;
let result: int = op(5, 3);
Function types can be used for:
- Callbacks
- Higher-order APIs
- Thread entry points
- Native library integration
Example:
pub const apply -> fn (
callback: fn (int) int,
value: int
) int {
return callback(value);
}
Features:
- Function type declarations using
fn (...) return_type - Functions may be assigned to variables
- Functions may be passed as arguments
- Compatible with native callback APIs
- Implicit compatibility between
fn(...)and*fn(...)
Cross-Platform Support
Luma now supports the following operating systems and architectures, detected automatically at compile time:
- Linux
- Windows (32-bit and 64-bit)
- macOS (Intel and ARM)
- iOS
- Android
- FreeBSD
- NetBSD
- OpenBSD
- DragonFly BSD
- Generic Unix
@os Directive
Write platform-specific code directly in the language:
@os linux {
"linux" -> {}
"macOS" -> {}
"windows" -> {}
}
Features:
- Platform-specific implementations
- Compile-time selection
- Cleaner standard library abstractions
- Reduced platform boilerplate
Performance Improvements
Parallel Module Compilation
Large projects now compile significantly faster through parallel object generation.
Highlights:
- Automatic CPU core detection
- Multi-threaded module compilation
- Reduced LLVM verification overhead
Observed improvements:
18.33s → 2.78s
Up to a 6.6× speedup on larger projects.
Compiler Optimizations
Additional improvements include:
- Faster module lookup
- LLVM code generation cleanup
- Reduced allocation overhead
- Improved internal hashing and lookup performance
Standard Library
New Modules
std/libc.lx
Provides bindings for:
- stdio
- stdlib
- string
- math
- time
- socket APIs
std/thread.lx
POSIX thread support including:
- pthread_create
- pthread_join
- synchronization primitives
std/args.lx
Command-line argument handling utilities.
std/win32.lx
Windows API bindings for:
- kernel32
- msvcrt
Library Improvements
- Binary file read/write helpers added
- Vector library expanded with iterator support
- Improved allocator implementation
- Safe allocation wrappers added internally
- Printing support improved
- Exponent (
**) and modulo (%) operators added
Language Server Improvements
The Luma Language Server received major stability and usability improvements.
Highlights:
- Improved diagnostics
- Better semantic highlighting
- Hover type information
- Improved standard library path resolution
- Better code completion
- Cleaner error reporting
LSP support is now significantly more reliable than previous releases.
Documentation
Documentation generation has been expanded and improved.
Features:
- Better formatting
- Module documentation support
- Struct and enum documentation
- Function documentation
- Attribute documentation
- Improved generated output
Compiler & Analyzer Improvements
Numerous improvements were made across the parser, type checker, static analyzer, and LLVM backend.
Highlights include:
- Improved ownership tracking
- Better module resolution
- Improved struct method handling
- Correct handling of function pointer code generation
- More reliable Windows and macOS support
- Reduced analyzer false positives
- Improved expression and type handling
Build System
Luma now uses Meson.
Previous:
make
sudo ./install.shNew:
meson setup build
ninja -C build
sudo ./install.shBenefits:
- Improved cross-platform support
- Cleaner build configuration
- Better dependency management
- Easier maintenance
Breaking Changes
Projects building Luma from source should update their build workflow accordingly.
Installation
Pre-built binaries are available for:
- Linux x86_64
- Windows x86_64
- macOS x86_64
- macOS ARM64
Build from source:
git clone https://github.com/Luma-Programming-Language/Luma.git
cd luma
git checkout v0.2.0
meson setup build
ninja -C build
sudo ./install.shRequirements:
- LLVM 15+
- Meson
- Ninja
- GCC or Clang
Known Limitations
macOS
- Some terminal output behavior may vary depending on terminal configuration
- System-call abstraction layer remains Linux-focused
Windows
std/win32.lxcurrently covers only a subset of available APIs
Function Types
- Closures and captures are not yet supported
- Additional callback-related features are planned
Static Analyzer
- Conditional allocation paths may still produce false positives
- Array-of-pointer ownership tracking remains limited
Language Features
- Generics are not yet implemented
Community
Issues:
https://github.com/Luma-Programming-Language/Luma/issues
Discord:
https://discord.gg/gqnwasvqd9
Made with care by the Luma Team
Luma v0.1.6 - Stability Patch
Changelog for Bugfix Release (v0.1.6)
Fixes:
Resolved an issue where struct functions were not being called correctly from modules.
Corrected static analyzer behavior to only track pointer returns from #returns_ownership functions, preventing false positive memory leak warnings for structs with pointer fields.
Minor fixes for 2D matrix byte access on very large inputs.
Other Updates:
Updated README for clarity.
Added arena library and vector library.
Improved LSP support: correct path resolution for standard library files, better code completion, and added string_add function to the standard library.
Notes:
Static memory ownership tracking enhancements remain, including improved detection for memory leaks, double-free, and use-after-free within function scope.
Known limitations: struct field allocations tracked at the struct level; conditional allocation paths may still produce false positives; array-of-pointers patterns not fully tracked.
Luma v0.1.2 - Enhanced Error Reporting
A maintenance release improving compiler diagnostics and refining type semantics.
What's New
Improved Error Messages
The compiler now provides detailed, actionable error messages with source context:
error: could not compile due to 2 previous errors
error[TypeError]: Array types must declare a size, expected ';' after element type
--> tests/test.lx:3:27
|
3 | pub const foo -> fn () [int] {
| ^ Parser Error
|
error[TypeError]: Expected return type after function parameters
--> tests/test.lx:3:27
|
3 | pub const foo -> fn () [int] {
| ^ Parser Error
|
Improvements:
- Error counts showing total issues before compilation fails
- Categorized errors (TypeError, SyntaxError, etc.)
- Visual indicators pointing to exact problem locations
- Clear messages explaining what was expected
Type Refinement: char → byte
The char type has been renamed to byte for clarity:
// Before
let c: char = 'A';
let buffer: *char = alloc(256);
// Now
let c: byte = 'A';
let buffer: *byte = alloc(256);
This better represents 8-bit values and aligns with systems programming conventions.
Breaking Changes
char renamed to byte - Update all occurrences in your code:
# Quick migration
find . -name "*.lx" -exec sed -i 's/\bchar\b/byte/g' {} +Standard Library
All standard library modules updated to use byte:
string.lx- String functions use*bytememory.lx- Memory operations updatedsys.lx- System calls use*bytefor buffersio.lx- I/O functions adapted
Installation
Pre-built:
From source:
git clone https://github.com/Luma-Programming-Language/Luma.git
cd luma
git checkout v0.1.2
make
sudo ./install.shCommunity
- Issues: https://github.com/Luma-Programming-Language/Luma/issues
- Discord: https://discord.gg/gqnwasvqd9
Made with care by the Luma Team
GitHub: Luma-Programming-Language/Luma
v0.1.0 - Initial Release
Luma v0.1.0 - Initial Release
We're excited to announce the first public release of Luma, a statically typed, compiled systems programming language designed for simplicity, safety, and performance.
What is Luma?
Luma combines the low-level control of C with modern safety features and a clean, consistent syntax. It's designed for systems programmers who want predictable performance without sacrificing code clarity or safety.
Core Principles
- Simplicity: Minimal syntax with consistent patterns
- Safety: Strong typing and compile-time memory safety verification
- Performance: Zero-cost abstractions and predictable performance
Key Features
- Strong Static Type System with explicit typing
- Manual Memory Management with compile-time static analysis
- Struct Methods for clean object-oriented patterns
- Ownership Annotations for clear memory semantics
- Modern Safety Features including defer statements and pointer aliasing tracking
- Simple Module System for code organization
- Pattern Matching via exhaustive switch statements
- Direct System Calls for low-level control
What's New in v0.1.0
Static Memory Analyzer
The compiler now validates heap operations at compile time:
- Detects use-after-free, double-free, and memory leaks
- Integrates with
deferfor automatic cleanup tracking - Tracks ownership transfers between variables
- Performs analysis at the end of type checking (no runtime cost)
- Reports exact source locations for memory safety issues
Example:
let p = alloc(32);
free(p);
use(p); // Error: use-after-free (caught at compile time)
Pointer Aliasing Support
Ownership and lifetime tracking now correctly handle pointer aliasing:
let c: *char = cast<*char>(alloc(6 * sizeof<char>));
let b: *char = c;
defer { free(b); }
The analyzer recognizes b as an alias of c and ensures they share the same ownership record, preventing double-free errors and memory leaks.
Ownership Annotations
Two new function attributes help the analyzer understand memory semantics:
#returns_ownership - Marks functions that return owned memory:
#returns_ownership
pub const make_buffer -> fn(size: int) *char {
return alloc(size);
}
#takes_ownership - Marks parameters that consume ownership:
#takes_ownership
pub const consume -> fn(ptr: *char) void {
free(ptr);
}
These annotations make ownership intent explicit while avoiding a full borrow/lifetime system.
What's Included
Language Features
- Complete type system (primitives, structs, enums, arrays, pointers)
- Struct methods
- Pattern matching with switch statements
- Defer statements for resource cleanup
- Static memory analysis (leak detection, double-free prevention)
- Ownership attributes (
#returns_ownership,#takes_ownership) - Module system with
@useand@module
Standard Library
The v0.1.0 release includes several essential modules:
math- Mathematical operations, trigonometry, constantsmemory- Low-level memory operations (memcpy, memset, calloc, etc.)string- String manipulation and conversion functionssys- Linux system call wrappers (x86_64 only)terminal- Interactive terminal input (getch, getpass, etc.)termfx- ANSI terminal formatting and colorstime- Timing and sleep functionsio- Formatted I/O operations
Example Programs
This release includes several fully working example programs:
- Chess Engine - Complete chess implementation with move validation and check detection
- Tetris - Full terminal-based Tetris game with colors and scoring
- 3D Spinning Cube - Real-time 3D rendering in the terminal
- Bubble Sort - Classic sorting algorithm demonstration
- Test Suites - Comprehensive tests for memory, string, and system operations
Quick Start
@module "main"
@use "math" as math
@use "termfx" as fx
const Point -> struct {
x: int,
y: int
};
pub const main -> fn () int {
let origin: Point = Point { x: 0, y: 0 };
let destination: Point = Point { x: 3, y: 4 };
let distance: double = math::sqrt(
cast<double>((destination.x - origin.x) * (destination.x - origin.x) +
(destination.y - origin.y) * (destination.y - origin.y))
);
output(fx::GREEN, "Distance: ", fx::RESET, distance, "\n");
return 0;
}
Compile and run:
luma main.lx -name program -l std/math.lx std/termfx.lx std/string.lx
./programInstallation
Pre-built Binaries
Download the latest release for your platform:
From Source
Requires: GCC/Clang, Make, LLVM
git clone https://github.com/Luma-Programming-Language/Luma.git
cd luma
make
sudo ./install.shPlatform Support
Planned:
- macOS (ARM64 and x86_64)
The system call interface (sys.lx) is currently Linux-specific. Other modules are platform-agnostic.
Known Limitations
This is an early release. Please be aware of these current limitations:
Language
- No generics yet (planned for future release)
- No function overloading
- Limited operator overloading
- No compile-time evaluation beyond constants
- No module exports beyond
pubkeyword
Standard Library
sys.lxis Linux x86_64 onlyterminal.lxuses shell commands (may not work in all environments)- Limited string formatting capabilities
- No networking or file I/O abstractions (use
sysmodule directly)
Tooling
- No package manager yet
- Limited error messages
- No LSP or IDE support
- Manual compilation only (no build system beyond makefiles)
Known Bugs
- Pipe operations in
sys.lxmay block indefinitely (marked in tests) - Some terminal operations might not work on all terminal emulators
- Memory analyzer may have false positives with complex ownership patterns
Example Programs
Try these example programs to see Luma in action:
# Terminal Tetris
luma tetris.lx -name tetris -l std/string.lx std/terminal.lx std/termfx.lx std/math.lx std/time.lx && ./tetris
# 3D Spinning Cube
luma 3d_spinning_cube.lx -name cube -l std/math.lx std/memory.lx std/string.lx std/termfx.lx std/time.lx std/io.lx && ./cube
# Memory Tests (with Valgrind)
luma mem_test.lx -name mem_test -l std/memory.lx && valgrind --leak-check=full ./mem_test
# Chess Game
luma main.lx -l board.lx piece.lx std/terminal.lx std/string.lx std/termfx.lx std/memory.lx -name chess && ./chessDocumentation
Complete language documentation is included in docs.md, covering:
- Language philosophy and design
- Complete type system reference
- Memory management guide
- Standard library API reference
- Example programs and patterns
Verified Behavior
- All test cases pass under Valgrind (no leaks)
- Analyzer successfully detects invalid frees and missing frees
- Pointer aliasing merges ownership safely
- Deferred frees resolve correctly across scopes
Roadmap
Future releases will focus on:
- v0.2.0 - Cross-platform support (macOS)
- v0.3.0 - Package manager and build system
- v0.4.0 - Language Server Protocol (LSP) support
- v0.5.0 - Advanced features (traits, interfaces, compile-time functions)
Contributing
We welcome contributions! This is an early-stage project and there's plenty to do:
- Report bugs via GitHub Issues
- Suggest features via GitHub Discussions
- Improve documentation
- Add test cases
- Fix known issues
- Create standard library modules
Please see CONTRIBUTING.md for guidelines.
Philosophy
Luma's goal is to stay low-level and explicit - no garbage collector, no runtime lifetimes - just pure manual memory control with a static verifier ensuring it's safe.
"You choose when to free - Luma just makes sure you do it right."
License
Luma is released under the MIT License.
Acknowledgments
Thank you to everyone who provided feedback during development and to the systems programming community for inspiration from languages like C, Rust, and Zig.
Getting Help
- Documentation: See
docs.mdin the repository - Issues: https://github.com/Luma-Programming-Language/Luma/issues
- Discussions: https://discord.gg/gqnwasvqd9
- Examples: Check the
tests/andexamples/directories
Note: This is an alpha-quality release intended for experimentation and feedback. It is not recommended for production use at this time. APIs may change between releases.
We're excited to share Luma with the community and look forward to your feedback!
Made with care by the Luma Team
GitHub: Luma-Programming-Language/Luma