v0.1.8-pre-beta
Release Notes: v0.1.8-pre-beta
This release marks a significant milestone for the Wave language, introducing foundational infrastructure for modern language features, a major overhaul of the compiler backend, and a vastly improved developer experience through advanced diagnostics.
Key Highlights
-
Modern Langauge Foundations: The introduction of Generics, Pattern Matching (
match), and Explicit Type Casting (as) provides the expressiveness needed for complex systems programming. -
Infrastructure Modernization: The backend has been upgraded to LLVM 21, fully embracing Opaque Pointers and the new PassBuilder optimization pipeline for improved performance and stability.
-
Portability & Diagnostics: With new Cross-ABI support (Linux x86_64 and macOS ARM64) and Rust-style error diagnostics, Wave is now more portable and developer-friendly than ever.
New Features
Language & Syntax
-
Generics Support: Basic infrastructure for generic functions and structs is now live. Standard library components like
TypedBuffer<T>and generic 1223math utilities are included. -
Pattern Matching: The new match statement allows for elegant control flow, lowered efficiently to LLVM switch instructions.
-
Static Globals: Global variables can now be declared using the
statickeyword, providing persistent storage throughout the program lifetime. -
Explicit Type Casting: The
asoperator (e.g.,x as i64) is now the standard for type conversions, replacing previous implicit behaviors. -
Conditional Compilation: Support for
#[target(os="...")]allows developers to write platform-specific code blocks within the same file. -
Pointer Arithmetic: Added support for
ptr + int,ptr - int, andptr - ptroperations. -
Null Literal: The
nullkeyword is introduced for pointer types, including semantic checks to prevent assignment to non-pointer types.
CLI & Tooling
-
Advanced Diagnostics: The compiler now provides detailed, colorized error messages with source code snippets, carets, and unique error codes (e.g., E1001).
-
GUI Build Manager: A new Tkinter-based graphical interface for
x.pyallows for visual management of build targets and toolchain installations. -
Dependency Management: External packages can now be resolved via
--depand--dep-rootflags. -
LLVM Customization: Expanded CLI support for fine-grained backend control, including
--target,--cpu, and--features.
Buf Fixes
-
C Varargs Type Promotion: Fixed an issue where small integers and floats were not correctly promoted to
i32anddoublewhen calling C functions likeprintf. -
Symbol Resolution: Resolved a bug where
extern Cfunctions were incorrectly looked up by their internal Wave name instead of their redirected LLVM symbol name. -
Inline Assembly Stability: Improved automatic clobber logic for empty assembly blocks to prevent accidental general-purpose register corruption.
-
Target Directory Routing: Fixed incorrect target directory pathing logic in the compiler backend.
Technical Changes
-
LLVM 21 & Opaque Pointers: Migrated from typed pointers to Opaque Pointers. All backend IR generation (loads, stores, GEPs) now requires explicit type tracking.
-
Monomorphization: Integrated a monomorphization pass into the compilation runner to handle generic code generation.
-
Standard Library Refactoring: System modules have been abstracted into platform-agnostic paths (e.g.,
std::sys::fs) using the new conditional compilation system. -
Entry Block Allocas: Local variable allocations are now moved to the function entry block to improve optimization compatibility.
Important Notes
-
Strict Type Narrowing: Implicit narrowing of integer types (e.g., assigning
i64toi32) is now forbidden. You must use theasoperator for explicit casting. -
Standard Library Imports: Existing code using platform-specific paths (like
std::sys::linux::fs) should be updated to the new common dispatch paths. -
Windows Target: Support for
x86_64-pc-windows-gnuis currently in transition and may be temporarily disabled in some automated build scripts.