Learn You Some Erlang のリリースの章の一部として、この問題に関する小さなガイドを書きました:
物事を小さくするために提示されたリリースファイルの1つを次に示します。
{sys, [
{lib_dirs, ["/home/ferd/code/learn-you-some-erlang/release/"]},
{erts, [{mod_cond, derived},
{app_file, strip}]},
{rel, "erlcount", "1.0.0", [kernel, stdlib, ppool, erlcount]},
{boot_rel, "erlcount"},
{relocatable, true},
{profile, embedded},
{app_file, strip},
{debug_info, strip},
{incl_cond, exclude},
{excl_app_filters, ["_tests.beam$"]},
{app, stdlib, [{mod_cond, derived}, {incl_cond, include}]},
{app, kernel, [{incl_cond, include}]},
{app, ppool, [{vsn, "1.0.0"}, {incl_cond, include}]},
{app, erlcount, [{vsn, "1.0.0"}, {incl_cond, include}]}
]}.
これにより、デバッグ情報が削除され、アプリ ファイルが可能な限り小さくなり、テスト ファイルが削除され、可能な限り多くのアプリケーションが除外されます。ユーザーがライブで実行できるようにする場合は、少なくとも SASL を含めて debug_info を保持する必要があることに注意してください。あなたの資料のコードのアップグレード。
全体として、ERTS 自体は 18.5MB を要します。上記のルールを使用する場合、これがスペースの大部分になるため、一部の実行可能ファイル (非 SMP Erlang など) をリストから削除できるかどうかを確認する必要があります。