indygreg / indygreg/PyOxidizer

Pyoxidizer builds are significantly larger than pyinstaller stand-alone, one-file builds

Open
#443 2 comments 5 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
6.2k
Forks
256
PR merge metrics
No merged PRs in 30d

Description

I've got a python program that I usually "compile" with pyinstaller, using its --one-file option to generate a single file executable. While this works the startup time of the generated executable is not great (>2 seconds). The executable size is ~17 MB.

I've been able to use pyoxydizer to generate an equivalent executable which takes much less time to start (~0.7 seconds), which is great. However, the installer size is much larger (~85 MB including all the files in the generated install folder). The executable itself is 64 MB.

Is there a way to cut down the size of the generated executable? This is being generated from a virtualenv which has the minimum number of dependencies installed in it.

Also, is there a way to embed the python3, python39, vcruntime140 and vcruntime140_1.dll files into the executable? I tried to use the standalone_static flavor but that did not work. Would that be the way to go?

Are the files in the "lib" folder needed for the executable to work?

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the PyOxidizer build from the reported virtualenv and compare the 64 MB executable with the 85 MB install folder. Investigate the standalone_static flavor and the generated lib folder, including python3, python39, vcruntime140, and vcruntime140_1.dll. Done means documenting supported ways to reduce size and embed dependencies, or identifying why they cannot be embedded.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rust
Domain
build-system, release
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.