Repository navigation
Myrissa™ - Pascal Elegance. C Interop. Native Binaries. Zero Dependencies.
Myrissa™ is a systems programming language that compiles straight to native Win64 and Linux64 binaries from a single Windows host. The lexer, parser, semantic analyzer, SSA optimizer, x86_64 encoder, PE/ELF writers, linker and runtime are all Delphi code in one repository. No LLVM. No Clang. No assembler, no link.exe, no ld, no C runtime to ship. Point myr at a .myr file and it produces an executable.
This is the first public release.
Highlights
- Pascal-flavored systems language --
begin..endblocks,:=assignment, strong static typing, a module system. Keywords are case-insensitive; identifiers are case-sensitive. - Sixteen primitive types with exact machine sizes, every one mapping to a C type:
int8touint64,float32,float64,char,wchar,boolean,pointer, and managedstring(UTF-8) andwstring(UTF-16). - Records like C structs -- inheritance,
packed,align(n), overlays (unions), anonymous overlays for tagged unions, bit fields, named record literals. - Routines -- one keyword for functions and procedures,
constandvarparameters, first-class routine types, overloading viacpplink, forward declarations, variadics withvarargs. - Full C ABI interop in both directions -- call any C library via
external; produce C-callable DLLs and static libraries withpublic routine clink. Naming a library in anexternalclause is what links it. - Four module kinds --
exe,dll,lib,unit. Private by default,publicto export, always qualified on import,initializeandfinalizeon every kind. - Structured exceptions --
guard/except/finallywiththrowandthrowcode. Catches software throws and hardware faults on both targets and propagates across routine, module and static-library boundaries. - Sets as stack bitmasks -- union, intersection, difference and membership are single instructions.
- Conditional compilation --
@define,@ifdef,@ifndef,@elseif,@else,@endifwithMYRISSA,TARGET_WIN64,TARGET_LINUX64,DEBUG,RELEASE,BUILD_EXE,BUILD_DLL,BUILD_LIB. - CImporter --
myr cimport <script.mys>reads C headers and writes a completeunitmodule with per-target DLL names. One binding serves both targets. Bindings for raylib, SDL3, SDL3_image, SDL3_mixer, SDL3_net, SDL3_rtf, SDL3_sound and SDL3_ttf ship with the release. - Built-in unit testing --
test "name" begin ... end;blocks withassert,asserteq,asserteqf,assertnil,assertnotnil,assertfailand more. - Version info and icons embedded through directives. No resource compiler step.
The pipeline
Every stage is Delphi code. No temporary files, no child processes. Lexer, recursive-descent/Pratt parser, semantic analysis, emitter, SSA optimizer (constant propagation and folding, copy propagation, CSE, DCE), x86_64 codegen with linear-scan register allocation and direct byte encoding for both the Win64 and System V ABIs, PE writer with .pdata unwind info, ELF writer, COFF and ELF archive writers, and a linker that reads foreign MSVC and MinGW archives and chases /DEFAULTLIB into SDK import libraries.
Optimization levels: none (default, writes a .mdbg debug sidecar), basic, full. Every level must produce correct output on both targets; the compliance gate enforces it.
Tooling
myr-- the command-line compiler.-rbuild-and-run (Linux binaries run via WSL),-ddebug,-t win64|linux64,-opt none|basic|full,-sub console|gui,-ooutput dir,-hhelp.myr cimport-- generate a binding unit from a C header via a.mysscript.myrlsp-- language server: diagnostics, completions, hover, go-to-definition, document symbols.- Native debugger -- DAP-based, over a
.mdbgsidecar. Breakpoints via@breakpoint;, stepping, variables, call stacks. Launch withmyr myapp -d. Currently targetswin64. myrtester-- runs every compliance suite across both targets at all three optimization levels.
Quick start
myr hello -r
Compiles hello.myr to a native executable and runs it. Add -t linux64 for an ELF binary from the same source.
Release contents (Myrissa-0.1.0-x86_64-windows.zip)
| Path | Description |
|---|---|
bin/myr.exe |
CLI compiler |
bin/myrlsp.exe |
Language server |
bin/myrtester.exe |
Compliance test runner |
bin/res/libs/std/ |
Standard library modules |
bin/res/libs/system/ |
System modules |
bin/res/libs/vendor/ |
Vendor bindings (raylib, SDL3 and the SDL3 satellite libraries) |
bin/res/cimport/ |
CImporter .mys scripts for the shipped bindings |
bin/res/demos/ |
raylib and SDL3 demos |
bin/res/tests/ |
Compliance test suites (.myr sources) |
bin/res/assets/ |
Demo assets |
docs/Myrissa.md |
Reference manual (Markdown) |
docs/Myrissa.pdf |
Reference manual (PDF) |
media/ |
Logo and branding |
README.md |
Project overview |
LICENSE |
Apache License 2.0 |
Documentation: See docs/Myrissa.md (or docs/Myrissa.pdf) for the complete language reference. Online at myrissa.org.
Requirements: Windows 10/11 x64. linux64 binaries build on the same host; running them via -r requires WSL2. Building the compiler from source requires Delphi 12 Athens.
File Integrity
Release files are signed with minisign to verify their authenticity and integrity.
Public key:
RWSLGfwSOWByrazkUwTzwlJ3rozKvaSnr3KT2aS/hSPDSLzUTPgj/m2X
To verify a downloaded file:
minisign -Vm <filename> -P RWSLGfwSOWByrazkUwTzwlJ3rozKvaSnr3KT2aS/hSPDSLzUTPgj/m2X
A successful verification confirms that the file was signed by the project and has not been modified since it was signed.