Skip to content

Releases: wavefnd/Wave

v0.1.6-pre-beta

18 Jan 05:11
dd16887

Choose a tag to compare

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.

v0.1.5-pre-beta

27 Nov 14:12
3760907

Choose a tag to compare

This release introduces the foundation of Object-Oriented Programming in Wave with the addition of Structs and Proto methods. Additionally, the build system has been completely overhauled to rely on system-installed LLVM libraries, significantly improving build stability and cross-platform compatibility.

Key Features

1. Structs & Field Access

You can now define custom data structures using the struct keyword and access their fields using dot notation.

  • Struct Definition: Define data containers with typed fields.
  • Field Access: Read values using object.field.
  • Pass-by-Value: Structs can be passed as arguments to functions.
struct Box {
    size: i32;
}

fun main() {
    var b: Box = Box { size: 42 };
    println("Size: {}", b.size);
}

2. Methods via proto

The proto keyword is now used to attach methods to existing structs.

  • Method Definition: Define methods associated with a specific struct.
  • self Parameter: Access the instance data within methods.
  • Method Call Syntax: Call methods using object.method().
proto Box {
    fun double_size(self: Box) -> i32 {
        return self.size * 2;
    }
}

3. Build System Overhaul

We have moved away from downloading custom LLVM binaries. The compiler now links against your system's LLVM installation.

  • System LLVM Detection: Automatically detects LLVM 14 on Linux, macOS (Homebrew), and Windows.
  • x.py Script: A new Python script (x.py) replaces Makefiles for easier building, testing, and packaging.
  • Cross-Compilation: Improved configuration for compiling Linux/Windows targets from a single environment.

4. CI/CD Improvements

  • Added macOS build workflows to GitHub Actions to ensure compatibility across major operating systems.

Fixes & Internal Changes

  • Parser Update: Improved lookahead logic to correctly distinguish between field access (obj.field) and method calls (obj.method()).
  • LLVM IR Generation: Refactored expression generation to handle struct literals and memory addresses more reliably.
  • Config: Fixed target-specific linker errors in .cargo/config.toml.

v0.1.4-pre-beta

01 Aug 03:06
f45f2a7

Choose a tag to compare

Wave 0.1.4-pre-beta

PR and Commits

Showcase

The showcase is available at Wave-Test.


Features

CLI:

wavec run --img main.wave

Method Chaining:

fun len(s: str) -> i32 {
    var count: i32 = 0;
    while (s[count] != 0) {
        count += 1;
    }
    return count;
}

fun main() {
    var my_string: str = "Hello World";
    var length: i32 = my_string.len();
    println("Result of my_string.len(): {}", length);
}

Thank you for using Wave! Stay tuned for future updates and enhancements.


Installation Guide

  1. Download:

    • Download to Curl.
      curl -fsSL https://wave-lang.dev/install.sh | bash -s -- --version v0.1.4-pre-beta
  2. Verify Installation:

    • Open a terminal and type:
      wavec --version
    • If the version number displays, the installation was successful.

Contributor

@LunaStev | 🇰🇷

v0.1.4-pre-beta-nightly-2025-07-16

16 Jul 03:22
84a82ef

Choose a tag to compare

Pre-release

Wave 0.1.4-pre-beta-nightly-2025-07-16

PR and Commits

Showcase

The showcase is available at Wave-Test.


Thank you for using Wave! Stay tuned for future updates and enhancements.


Installation Guide

  1. Download:

    • Download to Curl.
      curl -fsSL https://wave-lang.dev/install.sh | bash -s -- --version v0.1.4-pre-beta-nightly-2025-07-16
  2. Verify Installation:

    • Open a terminal and type:
      wavec --version
    • If the version number displays, the installation was successful.

Contributor

@LunaStev | 🇰🇷

v0.1.3-pre-beta

14 Jul 06:10
74b77fe

Choose a tag to compare

Wave 0.1.3-pre-beta

PR and Commits

Showcase

The showcase is available at Wave-Test.


Thank you for using Wave! Stay tuned for future updates and enhancements.


Installation Guide

  1. Download:

    • Download to Curl.
      curl -fsSL https://wave-lang.dev/install.sh | bash -s -- --version v0.1.3-pre-beta
  2. Verify Installation:

    • Open a terminal and type:
      wavec --version
    • If the version number displays, the installation was successful.

Contributor

@LunaStev | 🇰🇷

v0.1.3-pre-beta-nightly-2025-07-11

11 Jul 02:42
9026995

Choose a tag to compare

Pre-release

Wave 0.1.3-pre-beta-nightly-2025-07-11

PR and Commits


Thank you for using Wave! Stay tuned for future updates and enhancements.


Installation Guide

For Linux:

  1. Download and Extract:

    • Download the wave-v0.1.3-pre-beta-nightly-2025-07-11-x86_64-linux-gnu.tar.gz file from the official source.
    • Use the wget command:
      wget https://github.com/LunaStev/Wave/releases/download/v0.1.3-pre-beta-nightly-2025-07-11/wave-v0.1.3-pre-beta-nightly-2025-07-11-x86_64-linux-gnu.tar.gz
    • Extract the archive:
      sudo tar -xvzf wave-v0.1.3-pre-beta-nightly-2025-07-11-x86_64-linux-gnu.tar.gz -C /usr/local/bin
  2. Setting up LLVMs

    • Open a terminal and type:
      sudo apt-get update
      sudo apt-get install llvm-14 llvm-14-dev clang-14 libclang-14-dev lld-14 clang
      sudo ln -s /usr/lib/llvm-14/lib/libLLVM-14.so /usr/lib/libllvm-14.so
      export LLVM_SYS_140_PREFIX=/usr/lib/llvm-14
      source ~/.bashrc
  3. Verify Installation:

    • Open a terminal and type:
      wavec --version
    • If the version number displays, the installation was successful.

Contributor

@LunaStev | 🇰🇷

v0.1.3-pre-beta-nightly-2025-07-06

06 Jul 13:12
8d06e1f

Choose a tag to compare

Pre-release

Wave 0.1.3-pre-beta-nightly-2025.07.06

PR and Commits


Thank you for using Wave! Stay tuned for future updates and enhancements.


Installation Guide

For Linux:

  1. Download and Extract:

    • Download the wave-v0.1.3-pre-beta-nightly-2025-07-06-x86_64-linux-gnu.tar.gz file from the official source.
    • Use the wget command:
      wget https://github.com/LunaStev/Wave/releases/download/v0.1.3-pre-beta-nightly-2025-07-06/wave-v0.1.3-pre-beta-nightly-2025-07-06-x86_64-linux-gnu.tar.gz
    • Extract the archive:
      sudo tar -xvzf wave-v0.1.3-pre-beta-nightly-2025-07-06-x86_64-linux-gnu.tar.gz -C /usr/local/bin
  2. Setting up LLVMs

    • Open a terminal and type:
      sudo apt-get update
      sudo apt-get install llvm-14 llvm-14-dev clang-14 libclang-14-dev lld-14 clang
      sudo ln -s /usr/lib/llvm-14/lib/libLLVM-14.so /usr/lib/libllvm-14.so
      export LLVM_SYS_140_PREFIX=/usr/lib/llvm-14
      source ~/.bashrc
  3. Verify Installation:

    • Open a terminal and type:
      wavec --version
    • If the version number displays, the installation was successful.

Contributor

@LunaStev | 🇰🇷

v0.1.3-pre-beta-nightly-2025-06-28

28 Jun 06:00

Choose a tag to compare

Pre-release

branch: https://github.com/LunaStev/Wave/tree/llvm_opt


Thank you for using Wave! Stay tuned for future updates and enhancements.


Installation Guide

For Linux:

  1. Download and Extract:

    • Download the wave-v0.1.3-pre-beta-nightly-2025-06-28-x86_64-linux-gnu.tar.gz file from the official source.
    • Use the wget command:
      wget https://github.com/LunaStev/Wave/releases/download/v0.1.3-pre-beta-nightly-2025-06-28/wave-v0.1.3-pre-beta-x86_64-linux-gnu.tar.gz
    • Extract the archive:
      sudo tar -xvzf wave-v0.1.3-pre-beta-nightly-2025-06-28-x86_64-linux-gnu.tar.gz -C /usr/local/bin
  2. Setting up LLVMs

    • Open a terminal and type:
      sudo apt-get update
      sudo apt-get install llvm-14 llvm-14-dev clang-14 libclang-14-dev lld-14 clang
      sudo ln -s /usr/lib/llvm-14/lib/libLLVM-14.so /usr/lib/libllvm-14.so
      export LLVM_SYS_140_PREFIX=/usr/lib/llvm-14
      source ~/.bashrc
  3. Verify Installation:

    • Open a terminal and type:
      wavec --version
    • If the version number displays, the installation was successful.

Contributor

@LunaStev | 🇰🇷

v0.1.3-pre-beta-nightly-2025.06.25

25 Jun 06:33
c2e5f68

Choose a tag to compare

Pre-release

Wave 0.1.3-pre-beta-nightly-2025.06.25

PR and Commits


Thank you for using Wave! Stay tuned for future updates and enhancements.


Installation Guide

For Linux:

  1. Download and Extract:

    • Download the wave-v0.1.3-pre-beta-nightly-2025-06-25-x86_64-linux-gnu.tar.gz file from the official source.
    • Use the wget command:
      wget https://github.com/LunaStev/Wave/releases/download/v0.1.3-pre-beta-nightly-2025-06-25/wave-v0.1.3-pre-beta-x86_64-linux-gnu.tar.gz
    • Extract the archive:
      sudo tar -xvzf wave-v0.1.3-pre-beta-nightly-2025-06-25-x86_64-linux-gnu.tar.gz -C /usr/local/bin
  2. Setting up LLVMs

    • Open a terminal and type:
      sudo apt-get update
      sudo apt-get install llvm-14 llvm-14-dev clang-14 libclang-14-dev lld-14 clang
      sudo ln -s /usr/lib/llvm-14/lib/libLLVM-14.so /usr/lib/libllvm-14.so
      export LLVM_SYS_140_PREFIX=/usr/lib/llvm-14
      source ~/.bashrc
  3. Verify Installation:

    • Open a terminal and type:
      wavec --version
    • If the version number displays, the installation was successful.

Contributor

@LunaStev | 🇰🇷

v0.1.2-pre-beta

21 Jun 14:49
7ea1b9a

Choose a tag to compare

Wave 0.1.2-pre-beta


✅ Added Features

🔍 Generalized Indexing Support

  • Extended arr[index] syntax to support variable indexing in any context.

  • Now supports dynamic indexing like arr[i], ptr[j], get_array()[k] inside if, while, return, and assignments.

  • Internally handles pointer types (e.g., i8*) using GEP and performs automatic type casting (e.g., i8 vs i64) for comparisons and assignments.

➕ Added % (Remainder) Operator Support

  • Wave now supports the modulo operator % for integer types.

  • Expressions like a % b, 10 % 3, and var x: i32 = a % b are now fully parsed and compiled to LLVM IR using srem (signed remainder).

  • Parser was updated to recognize % as TokenType::Remainder, and IR generation uses build_int_signed_rem for correct runtime behavior.

  • % is fully supported inside expressions, assignments, conditionals, and return statements.

⚙️ Assignment Operators (+=, -=, *=, /=, %=)

  • Supports compound assignment operators for both integers (i32) and floating-point numbers (f32).

  • Operators implemented: +=, -=, *=, /=, %=.

  • Type-safe operation with proper distinction between integer and float IR instructions:

    • add, sub, mul, sdiv, srem for integers.

    • fadd, fsub, fmul, fdiv, frem (uses fmodf) for floats.

  • Implicit type casting during assignment (e.g., assigning an int to a float variable triggers intfloat conversion).

  • Proper LLVM IR generation for all supported operations, including float remainder via external fmodf call (linked with -lm).

🐛 Bug Fixes

🔢 Accurate Token Differentiation Between Integers and Floats

  • Number parsing logic has been overhauled to properly distinguish between integer literals (e.g., 42) and floating-point literals (e.g., 3.14, 42.0).

  • Previously, all numeric literals were parsed as Float(f64) tokens, even when no decimal point was present.
    → Now, tokens like 123 are correctly parsed as Number(i64), and 123.45 as Float(f64).

  • Introduced internal flag is_float to detect presence of . during scanning. If found, the number is parsed as a float; otherwise, as an integer.

  • Implemented type-safe error handling:

    • Fallbacks to TokenType::Number(0) or TokenType::Float(0.0) on parse failure, ensuring the lexer remains stable on malformed input.
  • This fix improves downstream type checking, IR generation, and expression evaluation, especially for typed languages like Wave where i64 and f64 must be handled distinctly.

✨ Other Changes

🧠 Library and Binary 2 Coexist

  • Add lib.rs for easy package manager creation, development, and easy access.

Showcase

The showcase is available at Wave-Test.


Thank you for using Wave! Stay tuned for future updates and enhancements.


Installation Guide

  1. Download:

    • Download to Curl.
      curl -fsSL https://wave-lang.dev/install.sh | bash -s -- --version v0.1.2-pre-beta
  2. Verify Installation:

    • Open a terminal and type:
      wavec --version
    • If the version number displays, the installation was successful.

PR and Commits


Contributor

@LunaStev | 🇰🇷