Megumi is a systems programming language that doesn't feel like one. I wanted to see if we could take the clean, readable syntax of Swift and pair it with the strict memory safety and performance of Rust.
It’s built for everything from high-level apps to low-level stuff like drivers and engines. No garbage collector, just fast machine code and a borrow checker that keeps you out of trouble.
- Actually readable: If you've used Swift, the
let/varbindings,guardstatements, anddo-catchblocks will look familiar. - Fast by default: We use LLVM 18 under the hood. You get direct machine code with zero-cost abstractions.
- Safe memory: Like Rust, Megumi uses an ownership and borrowing model. It catches data races and null pointers before you even run your code.
- Modern kit: Generics, Traits, Pattern Matching, and Async/Await are all baked in from day one.
- Close to the metal: When safety gets in the way, use
unsafeblocks, raw pointers, or call C functions directly with our FFI.
You'll need CMake and LLVM 18 installed.
cmake -B build
cmake --build buildCreate hello.megumi:
fn main() {
print("Hello, Megumi!")
}Compile and run it:
./build/megumic hello.megumiWe're still early. The Lexer, AST, and Parser are done, so the compiler understands the language perfectly. Right now, I'm working on the Semantic Analysis phase (type checking and the "brain" of the compiler).
Megumi is released under the MIT License. Check the LICENSE file for the legal bits.