Skip to content
/ Wave Public
forked from wavefnd/Wave

A versatile programming language designed for high performance, safety, and seamless integration across diverse domains, from low-level systems programming to web development and AI.

License

Notifications You must be signed in to change notification settings

LunaStev/Wave

Β 
Β 

Repository files navigation

Wave Programming Language Logo

Wave

Pure Systems Programming Language

Website Β· Docs Β· Community


What is Wave?

Wave is a pure systems programming language designed for ultimate low-level control. Unlike other languages, Wave has zero builtin functions - giving you complete control over your program's behavior.

Wave operates in two distinct modes:

  • Low-level Mode (Default): Pure compiler with no standard library - perfect for kernel development, embedded systems, and bare-metal programming
  • High-level Mode (with Vex): Full standard library ecosystem via the Vex package manager

// Pure Wave: No builtin functions
fun main() {
    // Direct system calls only
    asm {
        "mov rax, 1"
        "mov rdi, 1" 
        "syscall"
    }
}


⚠️ Development Status
Wave is in active development. The compiler is functional but many features are still being implemented. See our roadmap for current progress.


πŸš€ Quick Start

Prerequisites

  • LLVM 14+
  • Linux(Debian etc.) (Windows/macOS support coming soon)

Install Command (curl)

curl -fsSL https://wave-lang.dev/install.sh | bash -s -- latest

Your First Wave Program

# Create a simple program
echo 'fun main() { }' > hello.wave

# Compile in low-level mode (no standard library)
wavec build hello.wave

# Or compile with Vex integration (when available)
wavec build hello.wave --with-vex

✨ Design Philosophy

πŸ”₯ Zero Overhead

Absolutely no builtin functions or runtime. What you write is what you get - pure machine code with no hidden costs or surprises.

🎯 Dual Mode

Choose your abstraction level: raw system calls for maximum control, or rich standard library through Vex package manager.

⚑ Modern Tooling

Rust-style error messages, advanced CLI, and seamless integration with the upcoming Vex ecosystem.


πŸ“š Documentation & CLI

Command Reference

# Display help
wavec help

# Compile a Wave program
wavec build <file> [options]

# Run a Wave program directly
wavec run <file>

# Build options
wavec build program.wave -o output    # Specify output file
wavec build program.wave --debug      # Enable debug mode  
wavec build program.wave -O2          # Optimization level
wavec build program.wave --with-vex   # Enable Vex integration

Error Messages

Wave provides Rust-style error messages to help you debug quickly:

error: standard library module 'std::iosys' requires Vex package manager
  --> program.wave:1:8
   |
1  | import("std::iosys");
   |        ^^^^^^^^^^^^
   |
   = help: Wave compiler in standalone mode only supports low-level system programming
   = suggestion: Use 'vex build' or 'vex run' to access standard library modules

🀝 Contributing

Wave is an open-source project and we welcome contributions! Whether you're fixing bugs, adding features, improving documentation, or sharing feedback, every contribution matters.

πŸ› οΈ Development

Ready to contribute code? Check out our contributing guidelines and development setup.

Contributing Guide

πŸ’¬ Community

Join our Discord community to discuss features, get help, and connect with other Wave developers.

Discord

πŸ’‘ Code Examples

Low-level System Programming

// Bare-metal: Direct system calls only
fun main() {
    asm {
        "mov ah, 0x0e"
        "mov al, 0x48"
        "int 0x10"
    }
}

High-level with Vex (Future)

import("std::iosys");

fun fibonacci(n: i32) -> i32 {
    if (n <= 1) {
        return n;
    }
    return fibonacci(n - 1) + fibonacci(n - 2);
}

fun main() {
    var i: i32 = 0;
    while (i <= 10) {
        println("fibonacci({}) = {}", i, fibonacci(i));
        i += 1;
    }
}

Memory Management

fun main() {
    var a: i32 = 42;
    var b: i32 = 84;
    
    // Direct pointer manipulation
    var ptr_a: ptr<i32> = &a;
    var ptr_b: ptr<i32> = &b;
    
    // Swap values through pointers
    var temp: i32 = deref ptr_a;
    deref ptr_a = deref ptr_b;
    deref ptr_b = temp;
    
    // a is now 84, b is now 42
}
πŸ“ More examples in the repository

Explore the test/ directory for more examples:

  • Basic syntax: Variables, functions, control flow
  • Pointers & Memory: Direct memory manipulation
  • System calls: Low-level OS interaction
  • Module system: Import and organization
  • Inline assembly: Hardware-level programming

πŸ—ΊοΈ Roadmap

Wave is actively developed with a clear roadmap:

  • Core Compiler - Basic Wave language compilation to LLVM
  • Dual Mode Architecture - Low-level and high-level compilation modes
  • Advanced Error Handling - Rust-style diagnostic messages
  • CLI Interface - Modern command-line experience
  • Vex Package Manager - Standard library and package ecosystem
  • For Loop Implementation - Complete control flow structures
  • Advanced Type System - Enhanced safety and ergonomics
  • Cross-platform Support - Windows, macOS, Linux
  • IDE Integration - Language server and tooling
  • Standard Library - Core functionality via Vex

See our GitHub Projects for detailed progress tracking.


πŸ“„ License & Attribution

Wave is released under the LSD License.

Core Contributors

Acknowledgments

  • LLVM Project(Temporary) - Code generation backend
  • Rust Community - Inspiration for tooling and error messages
  • Systems Programming Community - Feedback and requirements

Star History Chart

Built with ❀️ by the Wave community
Β© 2024 Wave Programming Language β€’ LSD License

About

A versatile programming language designed for high performance, safety, and seamless integration across diverse domains, from low-level systems programming to web development and AI.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 98.9%
  • Other 1.1%