# Stage 5 — Mix

Verdict on this Mac: **PASS**. Linux: **PENDING**.

`mix.exs` appends `:mojoler` after the Elixir compiler, so `Mix.Tasks.Compile.Mojoler` exists before it runs. The task shells to `scripts/build-native.sh` with `MOJOLER_OUT` set to `priv/native/staging`. On success it `rename`s each `.so` into `priv/native` and writes `FINGERPRINT` last. A failed `mojo build` deletes the staging directory and leaves the previous libraries.

`scripts/fingerprint.sh` hashes Mojo sources, the generator inputs, `erl_nif.h`, the compiler version, the target triple, and the link flags. A second `mix compile.mojoler` with the same inputs returns `{:noop, []}`. If the fingerprint changed and this VM already loaded a library, the task returns an error and does not rename over the mapped file.

`mix mojoler.doctor`, `mix mojoler.abi`, and `mix mojoler.inspect` wrap the existing scripts.

`examples/consumer` is a path dependency. `examples/umbrella/apps/child` is the same dependency inside an umbrella. E23: both tests passed, the consumer passed again after `mix clean`, and a release copied to a temp directory printed `42`.

Runtime policy: install Mojo 1.1.0. Do not vendor `libKGENCompilerRTShared`. CPU consumers do not install MAX. See [runtime.md](../runtime.md).
