Skip to main content
Muna supports compiling a tiny-but-growing subset of Python language constructs. Below are requirements and guidelines for compiling a Python function with Muna:

Specifying the Function Signature

The compiled function must be a module-level function, and must have parameter and return type annotations:
The compiled function must not have any variable-length positional or keyword arguments.

Digging Deeper

The pages below cover everything else the compiler needs to know about your function:

Supported Types

Value types supported for compiled model inputs and outputs.

Parameter Annotations

Attach annotations that unlock familiar interfaces, like OpenAI clients.

Language Coverage

Python language and library features supported by the compiler.

Sandboxes

Reconstruct your Python environment before compiling.

Inference Backends

Configure how the compiler lowers your model for inference.