Skip to main content
Muna compiles stateless Python functions into self-contained executable binaries.
Your Python code is lowered directly to native code, and does not rely on the Python runtime (or any other managed runtime).

Defining a Function

Write your function, add a docstring, then wrap it with our @compile decorator:
greeting.py
The docstring is used as a description, is required, and must be 100 characters or less.
The function must specify parameter and return type annotations. Learn more.

Compiling the Function

Use the Muna CLI to compile the function. First, make sure you are logged into the Muna CLI:
Then run the following command:
Muna will upload your code, perform code generation on your function and its dependencies, then compile for our supported platforms:

Compiling a function with the Muna CLI. This is realtime--not sped up.

Using the Function

Depending on the complexity of your function, it can take anywhere from a few seconds to a few minutes for the function to be compiled for all platforms. Once the function is compiled, you can run it everywhere:
You can check the compilation status of the function at muna.ai/predictors.