with zz.lua as posted at the start of the thread and luafmt.ini looking like
\catcode`\{=1
\catcode`\}=2
\let\DUMP\dump
\let\dump\relax
\input{luatex.ini}
\expandafter\everyjob\expandafter{\the\everyjob
\directlua{require("\jobname")}\end}
\DUMP
then
luatex --ini luafmt.ini
makes a format file and
luatex \&luafmt zz.lua
makes
Output written on zz.pdf (1 page, 11241 bytes).
with zz.pdf saying hello world.
David
