Skip to content

Ovum-Programming-Language/OvumCompiler

Ovum Compiler (ovumc)

The official compiler implementation for the Ovum Programming Language, written in C++. This compiler transforms Ovum source code (.ovum files) into executable bytecode for the Ovum Virtual Machine.

About Ovum

Ovum is a strongly statically typed, single-threaded programming language focused on safety, clarity, and performance. It features:

  • Memory safety via garbage collection
  • Immutability by default with explicit mutation using var
  • Pure functions (pure) that are side-effect free and cacheable
  • Interface-based polymorphism (no class inheritance)
  • Kotlin-like syntax with minimal, predictable constructs
  • JIT compilation with garbage collection for performance

Prerequisites

  • CMake 3.12 or higher
  • C++17 compatible compiler (GCC, Clang, or MSVC)
  • Git (for dependency management)

Quick Start

Automated Installation

The easiest way to build and install the compiler:

./install.sh

This script will:

  1. Configure CMake with Release build settings
  2. Build the ovumc executable
  3. Create a symbolic link in your home directory
  4. Optionally install to /usr/bin (Linux) or provide Windows instructions

Manual Build

  1. Configure the build:

    cmake -S . -B build
  2. Build the compiler:

    cmake --build build --target ovumc
  3. Build and run tests:

    cmake --build build --target ovumc_tests
    ctest --test-dir build

Usage

Once built, the ovumc compiler can be used to compile Ovum source files:

# Compile an Ovum source file
ovumc input.ovum -o output.bytecode

# Show help
ovumc -h

Development

Building for Development

For development builds with debug information:

cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build

Running Tests

The project includes comprehensive tests using Google Test:

# Run all tests
ctest --test-dir build

# Run specific test executable
./build/ovumc_tests.exe  # Windows
./build/tests/ovumc_tests  # Linux/macOS

Code Quality

The project includes:

  • Clang-format configuration (.clang-format)
  • Clang-tidy configuration (.clang-tidy)
  • CI/CD pipeline with automated testing

Contributing

We welcome contributions! Please see our Contributing Guidelines for details on:

  • Code style and formatting
  • Testing requirements
  • Pull request process
  • Issue reporting

Related Projects

  • OvumLanguage - Main language repository with documentation and specifications
  • OvumVM - Virtual Machine implementation (planned)

License

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

Support

About

Compiler for Ovum Language that compiles Ovum source code to Ovum Intermediate Language

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published