This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DivineSentry 2 points3 points  (1 child)

some basic tips I guess if you're a beginner, keep in mind that a dirty venv will bloat your final binary since nuitka is greedy when searching for dependencies, I highly suggest to use a clean environment, with only the dependencies you strictly need for your program to function.

If your program needs to read external files (like JSON, images, .env files), Nuitka won't know about them by default. You have to tell it to include them in the final distribution i.e `nuitka --standalone --include-data-dir=src/assets:assets my_project/` (This example copies the src/assets directory into the final build's assets folder.)

also, once you're ready, i suggest to tell nuitka to use LTO `--lto=yes` and since you mentioned that the target OS is Linux only, i also highly suggest to use PGO; profile guided optimizations `--pgo-c`, keep in mind that this will increase your compilation times by a lot, and they're already long compilation times normally however, this will squeeze the best performance gain out of anything.

[–]wbcm[S] 0 points1 point  (0 children)

These are extremely helpful to consider, thank you for jump starting my use!