> ## Documentation Index
> Fetch the complete documentation index at: https://docs.muna.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Preparing for Compilation

> Ensuring that your functions can be compiled successfully.

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:

```py icon="python" theme={null}
from muna import compile

@compile(...)
def greeting(name: str) -> str:
    return f"Hello {name}"
```

<Warning>
  The compiled function **must not** have any variable-length positional or keyword arguments.
</Warning>

## Digging Deeper

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

<Columns cols={2}>
  <Card title="Supported Types" icon="shapes" href="/compile/requirements/types">
    Value types supported for compiled model inputs and outputs.
  </Card>

  <Card title="Parameter Annotations" icon="tags" href="/compile/requirements/annotations">
    Attach annotations that unlock familiar interfaces, like OpenAI clients.
  </Card>

  <Card title="Language Coverage" icon="python" href="/compile/requirements/language">
    Python language and library features supported by the compiler.
  </Card>

  <Card title="Sandboxes" icon="box" href="/compile/requirements/sandbox">
    Reconstruct your Python environment before compiling.
  </Card>

  <Card title="Inference Backends" icon="microchip" href="/compile/requirements/backends">
    Configure how the compiler lowers your model for inference.
  </Card>
</Columns>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.