Skip to content
/ veyra Public

Veyra is a production-ready programming language that combines the safety of modern language design with powerful runtime features.

License

Notifications You must be signed in to change notification settings

k6w/veyra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

86 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Veyra Programming Language

Veyra Logo

A modern, safe, and performant programming language with advanced runtime features

CI Release Security Version License Rust

Quick Start β€’ Documentation β€’ Examples β€’ Contributing


🌟 Overview

Veyra is a production-ready programming language that combines the safety of modern language design with powerful runtime features. Built with Rust, it offers:

  • Memory Safety - Advanced garbage collection with mark-and-sweep algorithm
  • High Performance - JIT compilation with optimization passes
  • Modern Concurrency - Built-in async/await and actor model support
  • Developer Experience - Comprehensive toolchain with IDE integration
  • Production Ready - Complete runtime system with thread pools and memory management

✨ Key Features

Core Language

  • Dynamic Typing with runtime type checking
  • First-class Functions with closures and higher-order functions
  • Pattern Matching for elegant control flow
  • Rich Operators including compound assignments and power operators
  • Exception Handling with try-catch-finally blocks
  • Module System for code organization

Advanced Runtime

  • Garbage Collector - Automatic memory management
  • JIT Compiler - Dynamic compilation for performance
  • Async Runtime - Native async/await support
  • Thread Pool - Work-stealing scheduler for parallelism
  • Actor System - Message-passing concurrency

Developer Toolchain

  • REPL - Interactive development environment
  • LSP Server - Full IDE integration with IntelliSense
  • Debugger - Step-through debugging with breakpoints
  • Linter - Code quality and style checking
  • Package Manager - Dependency management
  • VS Code Extension - Syntax highlighting and language support

πŸš€ Quick Start

Prerequisites

πŸ“¦ Installation

Option 1: Download Pre-built Releases (Recommended)

Download the latest release for your platform from the releases page:

  • Linux x64: veyra-linux-x64.tar.gz
  • Linux ARM64: veyra-linux-arm64.tar.gz
  • Windows x64: veyra-windows-x64.zip
  • Windows ARM64: veyra-windows-arm64.zip
  • macOS x64 (Intel): veyra-macos-x64.tar.gz
  • macOS ARM64 (Apple Silicon): veyra-macos-arm64.tar.gz

Each release includes all tools and the standard library.

Option 2: Build from Source

# Clone the repository
git clone https://github.com/k6w/veyra.git
cd veyra

# Quick build (Unix/Linux/macOS)
./scripts/build-release.sh

# Quick build (Windows PowerShell)
.\scripts\build-release.ps1

# Manual build
cd compiler && cargo build --release && cd ..
cd tools && cargo build --release && cd ..

Option 3: Install VS Code Extension

Download the veyra-lang-*.vsix file from releases and install it in VS Code:

  1. Open VS Code
  2. Press Ctrl+Shift+P (or Cmd+Shift+P on macOS)
  3. Type "Extensions: Install from VSIX"
  4. Select the downloaded .vsix file

Your First Veyra Program

Create a file hello.vey:

# Classic Hello World
fn main() {
    println("Hello, Veyra!")
}

main()

Run it:

# If using pre-built release
veyc hello.vey

# If built from source
./compiler/target/release/veyc hello.vey

Try the REPL

# If using pre-built release
veyra-repl

# If built from source
./tools/target/release/veyra-repl
>>> let x = 42
>>> let y = x * 2
>>> println(y)
84
>>> fn greet(name) { return "Hello, " + name + "!" }
>>> greet("World")
"Hello, World!"

πŸ“š Documentation

πŸ’‘ Examples

Variables and Types

let name = "Alice"
let age = 30
let pi = 3.14159
let active = true
let items = [1, 2, 3, 4, 5]

Functions

fn fibonacci(n) {
    if n <= 1 {
        return n
    }
    return fibonacci(n - 1) + fibonacci(n - 2)
}

println(fibonacci(10))  # Output: 55

Control Flow

fn check_grade(score) {
    if score >= 90 {
        return "A"
    } elif score >= 80 {
        return "B"
    } elif score >= 70 {
        return "C"
    } else {
        return "F"
    }
}

Collections

# Arrays
let numbers = [1, 2, 3, 4, 5]
for num in numbers {
    println(num * 2)
}

# Dictionaries
let person = {"name": "Bob", "age": 25}
println(person["name"])

Error Handling

fn safe_divide(a, b) {
    try {
        return a / b
    } catch e {
        println("Error: " + e)
        return null
    } finally {
        println("Division attempted")
    }
}

More examples in the examples/ directory.

πŸ› οΈ Tools

Language Server (LSP)

# Start the language server
./tools/target/release/veyra-lsp

Provides:

  • Auto-completion
  • Go to definition
  • Hover information
  • Error diagnostics
  • Code formatting

Debugger

# Debug a program
./tools/target/release/veyra-dbg program.vey

Features:

  • Breakpoints
  • Step through execution
  • Variable inspection
  • Call stack viewing

Linter

# Lint your code
./tools/target/release/veyra-lint program.vey

Checks for:

  • Code style violations
  • Potential bugs
  • Best practices

Package Manager

# Install a package
./tools/target/release/veyra-pkg install package-name

# Update dependencies
./tools/target/release/veyra-pkg update

πŸ§ͺ Running Tests

# Run compiler tests
cd compiler
cargo test

# Run tool tests
cd tools
cargo test

# Run language test suite
./compiler/target/release/veyra tests/comprehensive_test_suite.vey

πŸ—οΈ Project Structure

veyra/
β”œβ”€β”€ compiler/          # Veyra compiler (lexer, parser, interpreter)
β”œβ”€β”€ runtime/           # Advanced runtime (GC, JIT, async, actors)
β”œβ”€β”€ tools/             # Developer tools (REPL, LSP, debugger, etc.)
β”‚   β”œβ”€β”€ repl/         # Interactive REPL
β”‚   β”œβ”€β”€ lsp/          # Language Server Protocol implementation
β”‚   β”œβ”€β”€ debugger/     # Debugger
β”‚   β”œβ”€β”€ linter/       # Code linter
β”‚   β”œβ”€β”€ package_manager/  # Package manager
β”‚   └── vscode_extension/ # VS Code extension
β”œβ”€β”€ stdlib/            # Standard library modules
β”œβ”€β”€ spec/              # Language specification
β”œβ”€β”€ docs/              # Additional documentation
β”œβ”€β”€ examples/          # Example programs
└── tests/             # Test suite

🀝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

How to Contribute

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Setup

# Fork and clone
git clone https://github.com/k6w/veyra.git
cd veyra

# Build all components
cargo build

# Run tests
cargo test

# Format code
cargo fmt

# Run linter
cargo clippy

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Built with Rust
  • Inspired by modern programming language design
  • Community-driven development

πŸ“§ Contact


⬆ back to top

Made with ❀️ by the Veyra community

About

Veyra is a production-ready programming language that combines the safety of modern language design with powerful runtime features.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

Languages