Elvelt

Reference

MPL_Compiler Documentation

The unified reference for the MPL_Compiler project: the EMPL intermediate representation, nine source-language frontends, the C++ backend, and the cross-language standard library. Pick a section to start reading — every page is generated from the canonical docs/ tree.

Core IR

EMPL IR

The language-neutral intermediate representation that sits between every frontend and every backend. Node kinds, types, the printer, validator, and canonicalizer.

  • NodeKind

    Closed enumeration of every IR node class.

  • Types

    UIRType, TypeKind, Visibility, SourceLocation, Parameter.

  • Printer

    Render IR trees as stable, indented text.

  • Validator

    Structural validation with errors and warnings.

  • Canonicalizer

    Normalize IR and extract closure bindings.

Browse EMPL IR
Source Languages

Frontends

Nine first-class language frontends: JavaScript/TypeScript, Python, C#, Go, Rust, PHP, Ruby, Java, and the built-in EMPLS. Architecture, registration, and known limitations.

  • JavaScript / TypeScript

    ES2025 + Node.js v26 + TypeScript 6 + JSX + ESM/CJS.

  • Python

    Modern Python with type-aware parsing.

  • C#

    C# 12 features: init, records, the field keyword.

  • Go

    Channels, goroutines, defer, composite literals.

  • Rust

    Ownership, pattern matching, traits, async.

  • PHP

    Modern PHP 8 syntax and runtime semantics.

  • Ruby

    Blocks, mixins, and metaprogramming-aware lowering.

  • Java

    Records, sealed classes, pattern matching.

  • EMPLS

    The built-in demo language shipped with MPL_Compiler.

Browse Frontends
Target Generators

Backends

Code generators that consume EMPL IR and emit executable code. Today: a single C++20 backend. Tomorrow: JS, Python, Rust, WebAssembly, and more.

  • C++20

    The shipped backend — 10 000+ lines of self-contained lowering.

  • Hybrid Equivalence

    Cross-language semantic-equivalence checker.

  • Future Backends

    Roadmap for JS, Python, Rust, and WASM targets.

Browse Backends
Runtime

Standard Library

The language-neutral standard library specification. A single source of truth (Specification.json) drives per-backend implementations, headers, and the post-quantum cryptography layer.

  • Modules

    The canonical module catalogue.

  • Runtime

    Runtime semantics shared across backends.

  • PQC

    Post-quantum cryptography primitives.

  • C++ Implementation

    The C++20 implementation of the standard library.

  • Headers

    The header inventory emitted at compile time.

Browse Standard Library