You need Mojo 1.1.0, Elixir ~> 1.20, and OTP 28.3.1. mojo can be on PATH or in a .venv at the project root.
uv venv && uv pip install -r requirements.txt
mix deps.get
mix test
mix test compiles the NIFs, then runs ExUnit. A second run with the same sources skips mojo build.
In IEx:
iex> Mojoler.POC.add(20, 22)
42
iex> Mojoler.Term.list_sum([20, 22, 19, 25])
{:ok, 86}
iex> Mojoler.Term.echo_f64(22.3)
22.3
iex> Mojoler.Term.copy_binary(<<1, 2, 3>>)
{:ok, <<1, 2, 3>>, 3}list_sum/1 is the integer form of the total in the Mojo quickstart. Floats go through echo_f64/1. How those values are owned, copied, and destroyed is Value ownership and value lifecycles.
The Mojo language tours those calls come from:
- Mojo quickstart — lists, functions,
raises, andtry/except. - Get started — Conway’s Game of Life, structs, and the
^transfer. - Jupyter notebooks —
%%mojocells. GPU cells need MAX.
Another application that depends on this package:
cd examples/consumer
mix test
The function list is API.md. GPU batch, when MAX is installed: scripts/gpu-batch.sh.