Where could I start to support an effort towards a great binary generation of Python apps?

Hey all,

I’ve been a long a fan of using Python for my projects and when I started Chaos Toolkit a couple of years ago I decided to stick with it because I thought it was more appropriate for the project’s needs. The only downside vs using something like GoLang was, I felt, the rather poor-ish capabilities to generate a portable/fast binary off of the generated CLI application.

I went on and used pyinstaller which works but I can’t say it’s reached the smoothness of a golang binary.

So, here’s the point of this post, what could I do to contribute/help out maybe get there? Is there an appetite from the community for this? Is this a potential objective of the PSF for the future?

Just curious to get feedback and pointers from the community to make sure I can start contributing purposefully.

Cheers all!

PS: For the record, at the time I was starting the Chaos Toolkit, nuitka didn’t feel “there yet” so maybe the response, as a consumer, is just to switch tool. But I hope the discussion will rather be around “the need or not” from the community.

1 Like

I’m afraid I don’t have any answers to your post, hopefully someone else will have something to say, but I just wanted to say I’d also be interested to know what the community opinion is in this area.

Out of interest, what did you mean by the pyinstaller solution not reaching the ‘smoothness’ of a golang binary? What is it you feel pyinstaller is lacking?


What is it you feel pyinstaller is lacking?

I’m not sure it lacked anything when it came to creating the package itself (it wasn’t trivial for some libs but overall not that difficult either). It’s more at runtime, you feel the binary not beeing as fast to kick off as a golang generated binary.

Hey @Lawouach,Ansible is also Python-based, and provides some snappy binaries for multiple OSs. Maybe they can give you some ideas?

1 Like

Thanks for the tip Augusto! I will have look.

@indygreg has been working on hacking the interpreter initialization sequence with
PyOxidizer (written in Rust) so that the stdlib can be imported directly from memory without extracting to disk. I haven’t used it, but it looks like exciting stuff.

blog: https://gregoryszorc.com/blog/category/pyoxidizer/
github: https://github.com/indygreg/PyOxidizer
docs: https://pyoxidizer.readthedocs.io/en/stable/


Thank you Terry. This looks terrific!

In fact, this has been explicitly recommended as a funding priority in CPython development by the Steering Council. What to do going forward is still very much a work in progress, but I’d suggest talking to some of the people in the linked thread. They will be able to provide more concrete suggestions.

1 Like

It’s a great news! Will keeping a close eye :slight_smile: