Skip to content

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.

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.
  • def declares a function. The -> None return form is used for procedures that don’t carry a value back.
  • import std.io as io brings the standard I/O module in under a short alias. You can also write import std.io and call stdout_write_str(...) unqualified.
  • String literals are double-quoted; standard escapes (\n, \t, \x...) are supported.

The entry point may also return i32 when you want to control the exit code explicitly:

def main() -> i32:
return 0

For early exits from a main -> None program, use std.process.process_exit(code).

Public install instructions are pending while the release pipeline is finalised. For now, build from source by following the README in the Zmeu repository.