Getting started
Write your first Zmeu program in two minutes.
Zmeu is a systems language with a Python-shaped surface, an owned-value memory model, and an MLIR-based pipeline that lowers to the same LLVM IR shape as equivalent C. This page walks through writing and running a first program.
A first program
Section titled “A first program”Create a file called hello.zmeu:
import std.io as io
def main() -> None: io.stdout_write_str("Hello, World!\n")A few things to note:
- Zmeu uses indentation-sensitive blocks with exactly four spaces.
defdeclares a function. The-> Nonereturn form is used for procedures that don’t carry a value back.import std.io as iobrings the standard I/O module in under a short alias. You can also writeimport std.ioand callstdout_write_str(...)unqualified.- String literals are double-quoted; standard escapes (
\n,\t,\x...) are supported.
Process exit codes
Section titled “Process exit codes”The entry point may also return i32 when you want to control the exit code explicitly:
def main() -> i32: return 0For early exits from a main -> None program, use std.process.process_exit(code).
What to read next
Section titled “What to read next”- Syntax overview: the full surface in one page
- Types: scalars, views, slices, lists, optionals
- Pattern matching:
match,case, expression vs block arms - Examples: annotated programs you can copy into a file
Installing
Section titled “Installing”Public install instructions are pending while the release pipeline is finalised. For now, build from source by following the README in the Zmeu repository.