compile command compiles a Python function into a self-contained binary predictor that runs natively
on server, desktop, mobile, and web.
Usage
| Argument | Description |
|---|---|
PATH | Path to your Python source file |
Options
| Option | Description |
|---|---|
--overwrite | Delete any existing predictor with the same tag before compiling |
Compiling a Function
First, define a Python function with the@compile decorator:
greeting.py

Overwriting Predictors
If you’ve already compiled a predictor with the same tag, use--overwrite to replace it:
What Happens During Compilation
When you runmuna compile, the CLI:
- Parses your Python source file
- Identifies functions decorated with
@compile - Uploads the source code to Muna
- Performs code generation and transpilation to native C++
- Compiles binaries for all supported platforms
Compilation time varies based on function complexity. Check the status at
muna.ai/predictors.