Skip to content

Fix: Packbeam support runtime: false & avoid duplicates #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

petermm
Copy link
Contributor

@petermm petermm commented Mar 18, 2025

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(): elixir-lang/elixir@af64fe7

fixes: #44 and enables the pythonx/igniter PRs.

@petermm petermm force-pushed the fix-packbeam-runtime-false branch from a8ae009 to b5b771d Compare June 11, 2025 19:07
@petermm
Copy link
Contributor Author

petermm commented Jun 11, 2025

removed the opinionated default of setting :exatomvm as runtime: false in all circumstances, so should be ready to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uf2tool is included in device avm
1 participant