AtomVM
AtomVM copied to clipboard
Add --startup-module/--entry-point switch to PackBEAM
PackBEAM uses the first given .beam module as startup-module. This behavior is error prone and should be fixed. A new switch --startup-module (or maybe --entry-point) is proposed, so the startup module is explicitly set.
The standalone packbeam tool provided by atomvm_packbeam, and the packbeam_api module support this now. Perhaps the Erlang version of the tool can replace both the C tool used in AtomVM (as a submodule) and be used as a dependency for ExAtomVM. This would prevent any difference in the packed AVMs, simplify maintenance, and add the --start module functionality to ExAtomVM with very little additional work.