exatomvm icon indicating copy to clipboard operation
exatomvm copied to clipboard

Fix: Packbeam support `runtime: false` & avoid duplicates

Open petermm opened this issue 10 months ago • 0 comments

A new hello world project setup will yield a 40kb avm mix atomvm.packbeam. Pr fixes that and yields a sub 1kb avm.

PR filters out packing exatomvm (and it's deps) - effectively same as if runtime: false was set for exatomvm, which seems more than correct.

Additionally adding deps like:

{:exatomvm, path: "../../ExAtomVM"},
{:pythonx, "~> 0.4.4", runtime: false},
{:igniter, "~> 0.5", runtime: false}

yields a 1.9mb avm, before this PR.

(the Enum.uniq() - brings that down to 1.2mb - create an |> IO.inspect before to see the duplicate modules)

PR, drills down from the top level and respects runtime: false - and yields a <1 kb avm.

Somewhat related info on the Mix.Dep.cached(): https://github.com/elixir-lang/elixir/commit/af64fe7e9807906dcdc07e14a0e5ab435dd0b430

fixes: https://github.com/atomvm/exatomvm/issues/44 and enables the pythonx/igniter PRs.

petermm avatar Mar 18 '25 18:03 petermm