The MUFL compiler turns a .mufl source file into a .muflo content-addressed artifact. The artifact is what the evaluator runs at runtime; it is identical on every target.

Compile a file

mufl-compile path/to/my_app.mufl

By default the compiler emits the .muflo next to the source, named by the SHA-256 of the compiled code:

SAVED TO FILE: <84489F736AE948BADDA8FA661990F8D2ED6F412D3C53F54C44F0CFAEA7C37884.muflo>

The same compiler version compiling the same source always produces the same hash, on every platform. That is the property your downstream attestation logic relies on.

Run a compiled .muflo with the REPL

The mufl REPL can execute a compiled artifact directly, which is useful for sanity checks:

mufl -r 84489F736AE948BADDA8FA661990F8D2ED6F412D3C53F54C44F0CFAEA7C37884.muflo

Anything more involved — packets, transactions, persistence — needs a runtime wrapper.

Inside an application build

If your repository contains MUFL sources alongside a JavaScript / TypeScript host application, compile the MUFL ahead of bundling and treat the resulting .muflo as a static asset. The integrator-facing half of this story is covered in Embed .muflo in your app.

Type-checking with meta

By default the compiler runs the meta type-checking stage. It is significantly stricter than the runtime, and surfacing errors at compile time is almost always what you want. The meta library ships with the toolchain and is found automatically; if you have set MUFL_STDLIB in your environment, the compiler honours it.

For a deeper look at the type system, see The MUFL Type System.