Skip to content

v0.1.6-pre-beta

Choose a tag to compare

@LunaStev LunaStev released this 18 Jan 05:11
dd16887

Wave v0.1.6-pre-beta Release Note

This release marks a significant milestone in the development of Wave, featuring a massive architectural refactoring, the introduction of a modular standard library, and substantial enhancements to the compiler frontend and LLVM backend.

Core Refactoring and Architecture

  • Modular Compiler Frontend: The Lexer and Parser have been completely refactored from monolithic files into modular components. This improves maintainability and allows for more granular development of syntax and semantics.
  • Introduction of the Utils Crate: A new internal utility crate has been added, providing custom implementations for JSON parsing, terminal colorization (colorex), and string formatting (formatx), reducing reliance on external regex dependencies.
  • Improved Error System: The diagnostic system now uses a refined RGB color palette for better terminal readability and provides more accurate source code pointing and suggestions.

Language Features

  • Expanded Type System: Added support for a wider range of primitive types including i8-i128, u8-u128, f32/f64, bool, char, and byte.
  • Enhanced Literals: Added support for binary (0b), hexadecimal (0x), and octal (0o) integer literals, as well as character literals and boolean constants.
  • Advanced Expressions:
    • Implemented unary operators: negation (-), logical not (!), and bitwise not (~).
    • Implemented increment and decrement operators (++, --) in both prefix and postfix forms.
    • Added support for bitwise shift operations (<<, >>) and bitwise XOR (^).
  • Pointers and Memory: Improved address-of (&) and dereference (deref) operations, with stricter validation for l-values.
  • Arrays and Structs:
    • Added support for array literals and bounds-checked array type declarations.
    • Enhanced struct support including struct literals, field access, and method call syntax sugar.
  • Control Flow: Refined handling of if-else if-else chains and while loops, including support for break and continue statements within nested scopes.

Compiler Backend (LLVM)

  • Clang-based Linking: The compiler now generates object files via LLVM and uses Clang as a linker. This allows seamless linking with the C standard library (libc) and math library (libm).
  • Optimization Levels: Added support for optimization flags (-O0, -O1, -O2, -O3, -Oz, -Ofast).
  • Enhanced Inline Assembly: The asm block has been upgraded to support sophisticated input and output constraints, allowing for direct system calls and high-performance low-level code.
  • Modular Codegen: The LLVM backend is now organized into specialized modules for expressions, statements, and variable management.

CLI and Tooling

  • New CLI Commands:
    • build: Compiles a Wave file into a standalone executable.
    • install std / update std: Manages the Wave standard library installation from the official repository.
  • Granular Debugging: Added the --debug-wave flag to output specific compiler stages: tokens, ast, ir, mc, hex, or all.
  • Automated Testing: Introduced a Python-based test runner and a patch verification script to ensure compiler stability across changes.
  • Maintainers Registry: Added a MAINTAINERS file to define code ownership and streamline the review process.

Standard Library (std)

  • Introduced the first iteration of the Wave Standard Library, which operates independently of the compiler:
    • math: Modules for bit manipulation, floating-point operations, and integer utilities.
    • string: Core string operations including length calculation, comparison, finding, and trimming.
    • sys: Linux syscall wrappers.
    • net: Initial UDP socket support.
    • libc: A bridge for C ABI compatibility.

Development and Contribution

  • License Change: The project has returned to the Mozilla Public License 2.0 (MPL 2.0).
  • DCO Requirement: All contributions now require a Developer Certificate of Origin (Signed-off-by) to ensure legal clarity.
  • Updated Guidelines: CONTRIBUTING.md has been rewritten to support both GitHub Pull Requests and email-based patch workflows.

Miscellaneous

  • Updated .gitignore and .mailmap for better repository hygiene.
  • Removed legacy testing documentation in favor of the new automated test suite.
  • Improved the project README with updated build instructions and licensing information.