A zero-dependency native compiler for Windows x64. Write clean, statically-typed .myr source code and get standalone PE executables, DLLs, or static libraries -- no MSVC, no MinGW, no external linker, no runtime to ship.
module exe hello;
begin
println("Hello from Myrissa!");
end.
Compile and run:
myrc -s hello.myr -rMyrissa compiles ahead-of-time through a complete in-process pipeline: lexer, parser, AST, semantic analysis, SSA-based IR with optimization passes, x64 register allocation and instruction encoding, and PE linking with sections, imports, exports, and relocations. The entire toolchain runs in a single invocation. There is nothing to install, configure, or depend on.
The language takes its syntax philosophy from Pascal and Oberon: begin..end blocks, := assignment, strong static typing, and a module system that keeps code organized. Case-sensitive, semicolon-delimited, and designed to be readable at a glance.
Myrissa also ships as an embeddable DLL. Host applications can compile and execute Myrissa source at runtime through a flat C-compatible API, with pre-built bindings for C/C++ and Delphi/Free Pascal.
Myrissa is for developers who want native Win64 output without fighting the toolchain:
- Game developers: Scripting-language convenience with native compilation. Myrissa's
subsystem.routineAPI style pairs naturally with the PIXELS 2D engine. Import C libraries like raylib and SDL via the built-in CImporter. - Tool builders: Ship
Myrissa.dlland give your application native-code compilation at runtime. The flat C-compatible API supports compiler, debugger, CImporter, LSP, and test runner subsystems. C/C++ and Delphi/Free Pascal bindings are included. - Language enthusiasts: Study a complete native compiler stack from parsing and SSA IR through register allocation and PE linking -- all in one Delphi codebase with no third-party dependencies.
- Windows developers: Produce standalone Win64 binaries without shipping .NET, JVM, Python, or a pile of runtime DLLs alongside your application.
- Zero dependencies: The full compiler pipeline runs in one invocation. No build system, no toolchain installation, no PATH configuration. One tool produces standalone native binaries.
- Native x64 output: Ahead-of-time compiled to x86-64 machine code. No interpreter, no VM, no bytecode layer. The output runs bare metal.
- Multiple output targets: Compile the same source to EXE, DLL, static library (standard Win64
.lib, linkable by any compiler), or in-memory executable. Themoduledeclaration drives the output. - Pascal/Oberon syntax: Case-sensitive,
begin..endblocks,:=assignment, strong static typing. Records with inheritance, packed layout, and bit fields. Objects with methods,self/parent, and create/destroy lifecycle. - Routine overloading: Use
cpplinkfor Itanium ABI name mangling. Overloaded routines can be exported from and imported into.dlland.libfiles. - Structured exception handling:
guard/except/finallywiththrowandthrowcode. Full exception context viaexccode()andexcmsg()intrinsics. - Managed strings: UTF-8
stringand UTF-16wstringtypes with automatic lifecycle management. - Variadic routines: Define your own variadic routines with
.... Access arguments viavarargs.count,varargs.next(T), andvarargs.copy(). - Built-in debugger: Debug Adapter Protocol (DAP) support provides breakpoints, stepping, call stacks, and variable inspection. Works with VS Code and other DAP-capable editors. The
@breakpointdirective marks source locations. - Language Server Protocol: Real-time diagnostics, completion, hover, go-to-definition, references, document symbols, rename, semantic tokens, and formatting. In-process or out-of-process modes.
- CImporter: Parse C headers and generate Myrissa bindings for foreign function interfaces. Handles structs, unions, enums, typedefs, function declarations, preprocessor constants, and calling conventions.
- Embeddable API:
Myrissa.dllexposes a flat C-callable API for embedding the compiler, debugger, CImporter, LSP, console, utilities, menu, and test runner subsystems. Pre-built bindings atlib/c/include/Myrissa.handlib/pascal/Myrissa.pas. - Built-in unit testing:
test "name" begin ... end;blocks with typed assertions (assert,asserteq,assertnil,assertfail, and more). The compiler replaces the entry point with the test runner automatically. - Conditional compilation:
@define,@ifdef,@ifndef,@elseif,@else,@endifwith predefined platform and module-kind symbols. - Version info and icons: Embed Windows version information and application icons into executables via directives. No post-build steps or resource compilers required.
- SSA optimization: Mem2Reg, constant folding, and dead code elimination passes on the intermediate representation.
Every Myrissa program is a module. The module kind (exe, dll, lib, unit, or mem) is declared at the top of the file and determines what artifact gets built. An executable module has a begin..end. body that serves as the program entry point.
module exe hello;
@optimize debug
routine greet(const name: string; const times: int32);
var
i: int32;
begin
for i := 1 to times do
println("Hello, %s! (%d)", name, i);
end;
end;
begin
greet("Myrissa", 3);
end.
Compile and run:
myrc -s hello.myr -rOutput:
Hello, Myrissa! (1)
Hello, Myrissa! (2)
Hello, Myrissa! (3)
The output type is determined by the module declaration, not by CLI flags:
| Module Declaration | Output | Description |
|---|---|---|
module exe name |
name.exe |
Native Win64 executable |
module dll name |
name.dll |
Dynamic link library with exported routines |
module lib name |
name.lib |
Standard Win64 static library, linkable by Myrissa or other compilers |
module mem name |
(in memory) | Compile to memory and execute via the API (requires a host application) |
module unit name |
(none) | Reusable module compiled inline into the importing module |
The full language reference, BNF grammar, toolchain guide, API reference, and how-to recipes are in a single document:
| Document | Description |
|---|---|
| Myrissa Language Reference | Complete language tour with examples: types, routines, records, objects, choices, sets, overlays, arrays, strings, control flow, exceptions, memory management, pointers, variadics, modules, external declarations, DLL loading, conditional compilation, unit testing, directives, the full BNF grammar, toolchain usage, and the embeddable API reference. |
The release package contains the compiler (myrc.exe), the embeddable DLL (Myrissa.dll), pre-built API bindings, and the standard library. No external toolchain is required.
myrc -s <source.myr> [options]| Flag | Description |
|---|---|
-s <file> |
Source file to compile |
-o <dir> |
Output directory (default: output) |
-r |
Compile and run the resulting executable |
-d |
Compile and launch the debugger |
-h |
Show help |
myrc -s hello.myr # compile
myrc -s hello.myr -o build # compile to specific output directory
myrc -s hello.myr -r # compile and run
myrc -s hello.myr -d # compile and launch debugger| Requirement | |
|---|---|
| Host OS | Windows 10/11 x64 |
| Runtime dependencies | None |
| External toolchain | None |
This section is for contributors who want to modify the Myrissa compiler itself. If you just want to write Myrissa programs, use the release download above.
| Requirement | |
|---|---|
| Host OS | Windows 10/11 x64 |
| Compiler | Delphi 12.x or higher |
git clone https://github.com/tinyBigGAMES/Myrissa.git- Open
projects\Myrissa Programming Language.groupprojin the Delphi IDE - Build all projects in the group
- The tester project compiles and executes every test case/demos and reports results
Myrissa is an open project and contributions are welcome at every level:
- Report bugs: Open an issue on GitHub with a minimal
.myrreproduction case. - Suggest features: Describe the use case first, then the syntax you have in mind.
- Submit pull requests: Bug fixes, documentation improvements, new test cases, and well-scoped features.
- Review and discuss: Reviewing open pull requests and issues helps move the project forward.
Join our Discord to discuss development, ask questions, or share what you are building with Myrissa.
If Myrissa saves you time, sparks an idea, or becomes part of something you ship:
- Star the repo -- helps others find the project
- Spread the word -- write a post, mention it on social media
- Join us on Discord -- share what you are building
- Become a sponsor via GitHub Sponsors -- directly funds development
Myrissa is licensed under the Apache License 2.0. See LICENSE for details.
Myrissaβ’ Programming Language
Copyright Β© 2026-present tinyBigGAMESβ’ LLC All Rights Reserved.
