A minimal systems programming language that compiles to native executables via C++23.
Quick Start β’ Documentation β’ Examples β’ FAQ
Inspired by Niklaus Wirth's Oberonβitself derived from PascalβMyra preserves Pascal's readability and structure while removing decades of accumulated complexity. The result: 45 keywords, 9 built-in types, seamless C++ interoperability, and code that compiles to native executables.
module exe HelloWorld;
import Console;
begin
Console.PrintLn('Hello from Myra!');
end.
- β¨ Minimal by design β 45 keywords, 9 types. No redundancy.
- π C++ interoperability β Mix Myra and C++ freely. No wrappers needed.
- π¦ Batteries included β Zig compiler, LLDB debugger, raylib, Myra Edit, all bundled.
- π₯οΈ Myra Edit β Full editor with syntax highlighting, IntelliSense, and debugging.
- π Integrated debugger β Source-level debugging with breakpoints and stepping.
- 𧬠Type extension β Record inheritance without class complexity.
- βοΈ Methods β Bind routines to types with explicit
Selfparameter. - π‘οΈ Exception handling β Built-in try/except/finally.
- π Dynamic arrays β SetLength/Len with automatic memory management.
- π§ͺ Unit testing β Built-in TEST blocks for integrated testing.
- Windows (64-bit)
- Download the latest release from the Releases page
- Extract to a folder (e.g.,
C:\myra) - Add the
binfolder to your PATH
That's it! Everything is bundled β Zig compiler, LLDB debugger, Myra Edit, raylib, and the standard library.
Verify installation:
myra versionmyra init HelloWorld
cd HelloWorldOption 1: Use Myra Edit (Recommended)
myra editThis opens your project in a fully-configured editor with IntelliSense, debugging, and build integration.
Option 2: Command Line
myra build
myra runOutput:
Hello from Myra!
| Type | Description |
|---|---|
BOOLEAN |
True or false |
CHAR |
Signed single byte character |
UCHAR |
Unsigned single byte character |
INTEGER |
64-bit signed integer |
UINTEGER |
64-bit unsigned integer |
FLOAT |
64-bit floating point |
STRING |
Auto-managed string |
SET |
Bit set for ordinal ranges |
POINTER |
Untyped pointer |
type
TCounter = record
Value: INTEGER;
end;
method Increment(var Self: TCounter);
begin
Self.Value := Self.Value + 1;
end;
method GetValue(var Self: TCounter): INTEGER;
begin
return Self.Value;
end;
var
Counter: TCounter;
begin
Counter.Value := 0;
Counter.Increment();
Console.PrintLn('Count: {}', Counter.GetValue());
end.
type
TShape = record
X: INTEGER;
Y: INTEGER;
end;
TCircle = record(TShape)
Radius: INTEGER;
end;
var
Circle: TCircle;
begin
Circle.X := 100; // inherited from TShape
Circle.Y := 100; // inherited from TShape
Circle.Radius := 50; // own field
end.
Myra's defining feature: seamless C++ integration. If it's not Myra syntax, it's C++.
module exe CppDemo;
import Console;
#include_header '<cmath>'
#startcpp header
inline int Square(int x) {
return x * x;
}
#endcpp
begin
Console.PrintLn('Square(7) = {}', Square(7));
Console.PrintLn('sqrt(16) = {}', std::sqrt(16.0));
end.
try
DoRiskyOperation();
except
Console.PrintLn('Error: {}', System.GetExceptionMessage());
finally
Cleanup();
end;
#unittestmode ON
module exe Tests;
import UnitTest;
routine Add(const A: INTEGER; const B: INTEGER): INTEGER;
begin
return A + B;
end;
begin
end.
test 'Add returns correct sum';
begin
TestAssertEqual(5, Add(2, 3));
end;
| Type | Description |
|---|---|
module exe Name |
Executable program |
module lib Name |
Static library |
module dll Name |
Dynamic/shared library |
| Document | Description |
|---|---|
| Quick Start | Get running in 5 minutes |
| Tutorial | Guided learning path |
| Language Reference | Complete specification |
| Standard Library | Console, System, Assertions, UnitTest, Geometry, Strings, Convert, Files, Paths, Maths, DateTime |
| C++ Interop | Mixing Myra and C++ code |
| Build System | Compilation, targets, optimization |
| Examples | Real-world code samples |
| FAQ | Common questions answered |
| Migration Guide | Coming from Pascal/Delphi |
| Contributing | How to contribute |
Everything you need is bundled in the release:
myra/
βββ bin/
β βββ myra.exe # Myra compiler CLI
β βββ myralsp.exe # Language Server (IntelliSense)
β βββ res/
β βββ libs/
β β βββ std/ # Standard library
β β β βββ Assertions.myra
β β β βββ Console.myra
β β β βββ Convert.myra
β β β βββ DateTime.myra
β β β βββ Files.myra
β β β βββ Geometry.myra
β β β βββ Maths.myra
β β β βββ Paths.myra
β β β βββ Strings.myra
β β β βββ System.myra
β β β βββ UnitTest.myra
β β βββ raylib/ # Raylib (static library)
β β βββ include/
β β βββ lib/
β βββ lldb/ # LLDB debugger with DAP support
β β βββ bin/
β β βββ lldb-dap.exe
β β βββ lldb.exe
β βββ edit/ # Myra Edit (portable VSCodium)
β β βββ data/
β β β βββ extensions/
β β β βββ tinybiggames.myra-1.0.0/
β β βββ Edit.exe
β βββ runtime/ # C++ runtime support
β βββ zig/ # Bundled Zig compiler
β β βββ zig.exe
β βββ tests/ # Test suite
βββ src/ # Compiler source (Delphi)
βββ docs/ # Documentation
myra init <n> # Create new project
myra init <n> -t lib # Create static library project
myra init <n> -t dll # Create dynamic library project
myra build # Compile and build
myra run # Run the executable
myra debug # Run with integrated debugger
myra clean # Remove generated files
myra edit # Open project in Myra Edit
myra zig <args> # Pass arguments to Zig
myra version # Show version
myra help # Show helpMyra includes a complete editor based on VSCodium:
myra editThis opens your project in a fully-configured editor with:
- Semantic Highlighting β Context-aware coloring for types, variables, parameters, fields, routines, and constants
- Code Completion β Keywords, types, symbols, and record field access
- Signature Help β Parameter hints with overload support (navigate with β/β)
- Hover Information β Symbol details on mouse hover
- Go to Definition β Jump to symbol declarations (F12)
- Go to Type Definition β Jump from variable to its type declaration
- Go to Implementation β Navigate to implementation (Ctrl+F12)
- Find All References β Find all usages of a symbol (Shift+F12)
- Document Highlights β Highlight all occurrences of symbol under cursor
- Rename Symbol β Rename across all files (F2)
- Document Outline β Navigate symbols in the current file
- Folding Ranges β Collapse/expand routines, records, and test blocks
- Smart Selection β Expand selection to enclosing syntax (Shift+Alt+β)
- Real-time Diagnostics β Errors and warnings as you type
- Code Actions β Quick fixes and refactoring suggestions
- Breakpoints β Click in the gutter or press F9
- Step Debugging β Step over (F10), step into (F11), step out (Shift+F11)
- Variable Inspection β Watch expressions and local variables
- Call Stack β Full backtrace navigation
- Run/Debug Buttons β Quick access in the editor title bar
- Syntax Highlighting β Full Myra grammar with C++ passthrough support
- Code Snippets β Quick templates for common patterns
- Build Integration β Ctrl+Shift+B to build
- Keyboard Shortcuts β F5 (debug), Ctrl+F5 (run without debugging)
Myra includes a fully integrated source-level debugger:
myra debug| Command | Description |
|---|---|
b <file>:<line> |
Set breakpoint |
bl |
List breakpoints |
c |
Continue |
n |
Step over |
s |
Step into |
finish |
Step out |
bt |
Backtrace |
locals |
Show local variables |
p <expr> |
Evaluate expression |
r |
Restart program |
quit |
Exit debugger |
Use #breakpoint directives in code for automatic breakpoints.
#optimization DEBUG // Debug build
#optimization RELEASEFAST // Maximum performance
#target x86_64-windows // Cross-compile target
#apptype GUI // Windows GUI application
#include_header '<vector>' // Include C++ header
#link 'sqlite3' // Link library
#breakpoint // Set debugger breakpoint
Myra follows a simple principle:
If it's not Myra, it's C++. Emit it.
This means you can freely mix Myra and C++ code. No wrappers, no bindings, no FFI complexity. Write readable Myra for your application logic, drop to C++ when you need it.
- Platform: Windows (64-bit)
- Dependencies: None! Everything is bundled in the release:
- Zig compiler (C++ backend)
- LLDB debugger (with DAP support for IDE integration)
- Myra Edit (customized VSCodium with syntax highlighting, IntelliSense, and integrated debugging)
- Raylib (static library for game development)
- Standard library (Console, System, Assertions, UnitTest, Geometry, Strings, Convert, Files, Paths, Maths, DateTime)
Myra is licensed under the Apache License 2.0. See LICENSE for details.
Myraβ’ β Pascal. Refined.
Copyright Β© 2025-present tinyBigGAMESβ’ LLC.
All Rights Reserved.
