A minimal systems programming language that compiles to native executables via C++23. Write clean, readable code with seamless access to the entire C/C++ ecosystem.

45
Keywords
9
Built-in Types
C++23
Target
View on GitHub See Examples

See Myra in Action

Watch an introduction to the Myra programming language.

Designed for Clarity

Every feature serves a purpose. Nothing more, nothing less.

Minimal by Design

45 keywords and 9 built-in types. No classes, no interfaces, no generics. Just the essentials for writing clear, maintainable code.

🔗

C++ Interoperability

If it's not Myra, it's C++. Mix freely with raw C++ blocks, call any C/C++ library, and leverage the entire ecosystem without wrappers.

🧬

Type Extension

Records extending records with automatic virtual dispatch. Get polymorphism without the complexity of class hierarchies.

🛡️

Exception Handling

Full try/except/finally support with proper stack unwinding. Handle errors gracefully with familiar Pascal-style syntax.

📦

EXE, LIB & DLL Support

Build executables, static libraries, or dynamic libraries. Export functions with C or C++ ABI using simple directives.

🔧

Zig Build System

Cross-platform builds powered by Zig. Compile to Windows, Linux, macOS and more from a single codebase with zero configuration.

🔧

Integrated Debugger

Built-in source-level debugger with breakpoints, stepping, variable inspection, and stack traces. DAP support for IDE integration.

⚙️

Build Directives

Control your build with simple directives. Set #TARGET platform, #OPTIMIZATION level, #APPTYPE, #LINK libraries, and configure paths.

Code That Reads Like Prose

Clean syntax meets modern capabilities.

(* Simple Hello World in Myra *)

module exe HelloWorld;

import Console;

var
  Name: STRING;

begin
  Name := 'World';
  Console.PrintLn('Hello, {}!', Name);
end.
(* Type extension with virtual dispatch *)

module exe Shapes;

import Console;

type
  TShape = record
    X: INTEGER;
    Y: INTEGER;
  end;
  
  TCircle = record(TShape)  (* extends TShape *)
    Radius: INTEGER;
  end;

(* Base method *)
method Describe(var Self: TShape);
begin
  Console.PrintLn('Shape at ({}, {})', Self.X, Self.Y);
end;

(* Override with inherited call *)
method Describe(var Self: TCircle);
begin
  inherited Describe();
  Console.PrintLn('  Radius: {}', Self.Radius);
end;

var
  Circle: TCircle;

begin
  Circle.X := 100;
  Circle.Y := 200;
  Circle.Radius := 50;
  Circle.Describe();  (* Calls TCircle's method *)
end.
(* Seamless C++ integration *)

module exe CppDemo;

(* Raw C++ block for includes and declarations *)
#startcpp
#include <vector>
#include <algorithm>

std::vector<int> numbers;
#endcpp

import Console;

var
  I: INTEGER;

begin
  (* Call C++ directly in Myra code *)
  numbers.push_back(42);
  numbers.push_back(17);
  numbers.push_back(99);
  
  std::sort(numbers.begin(), numbers.end());
  
  for I := 0 to numbers.size() - 1 do
    Console.PrintLn('Value: {}', numbers[I]);
  end;
end.
(* Exception handling with try/except/finally *)

module exe ErrorHandling;

import 
  System,
  Console;

routine ProcessFile(const APath: STRING);
var
  Handle: INTEGER;
begin
  try
    Handle := OpenFile(APath);
    ReadData(Handle);
  except
    Console.PrintLn('Error: {}', System.GetExceptionMessage());
  finally
    CloseFile(Handle);
    Console.PrintLn('Cleanup complete');
  end;
end;

begin
  ProcessFile('data.txt');
end.

Why Myra?

Modern languages keep adding features. Myra takes the opposite approach, removing everything that isn't essential. The result is a language that's easy to learn, easy to read, and practical for real work.

Inspired by Niklaus Wirth's Oberon—itself derived from Pascal—Myra proves that simplicity isn't about being limited—it's about being focused. Type extension gives you polymorphism. C++ interoperability gives you power. Together, they let you build anything.

"Make it as simple as possible, but no simpler." — Albert Einstein
Feature Myra Delphi
Keywords 45 60+
Classes Type Extension Full OOP
Subroutines routine procedure/function
C++ Interop Native External
Memory Manual Manual
Target Native Native

Get Started

Up and running in minutes.

1

Download the Release

Batteries included — Zig compiler, LLDB debugger, and raylib bundled.

github.com/tinyBigGAMES/Myra/releases
2

Create a Project

Initialize a new executable project.

myra init HelloWorld cd HelloWorld
3

Build & Run

Compile to native executable and run.

myra build myra run