I'm treating .beam as a script so I can conceal my code and execute it any where.
Normally several files cooperate, for example:
entry.erl
helper.erl
....
Can several beam files be combined into a single beam?
My only idea is embedding the beam inside an erl file before compiling that, for example
["[",
lists:map(fun(Artifact) ->
{ok, Payload} = prim_file:read_file(Artifact),
["{", filename:basename(Artifact, ".beam"), ",", io_lib:format("~w", [Payload]), "},"]
end, Artifacts)
"ok]"]
producing
[{module, <<"....">>}]
then loading it via code:load_file