Evaluates Elixir code, or Erlang with --erlang, in a fresh sandboxed VM
and prints the result.
mix kettlecorn.eval 'Enum.sum(1..10)'
mix kettlecorn.eval --erlang 'lists:sum(lists:seq(1, 10)).'
mix kettlecorn.eval --file script.exs --timeout 2000 --max-memory 268435456Options:
--file PATH- read source from a file instead of a code argument.--erlang- evaluate Erlang instead of Elixir.--timeout MS- evaluation deadline in milliseconds (default 5000). SeeKettlecorn.eval/3for timeout and cleanup behavior.--max-memory BYTES- WebAssembly linear memory cap; seeKettlecorn.Sandboxfor the default.--runtime DIR- override normal runtime discovery; seeKettlecorn.Runtime.dir/1for the search order.
Prints captured output followed by the inspected result. Evaluator errors exit with status 1; other returned errors exit with status 2.