feat(nuitka): add Nuitka --onefile migration design#4
Open
Conversation
Switches the CLI binary toolchain from PyInstaller to Nuitka so warm invocations hit the payload-hash cache at ~/.agentrun/cache/ and avoid the ~2s per-call re-extraction, unblocking the agent-hot-path scenario. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nuitka --onefile compiles all Python to C on every run, which on cold CI runners routinely takes 15+ minutes in the Scons stage. Two mitigations: - Persist ~/.cache/ccache across workflow runs via actions/cache, keyed on target + Python version + hash of pyproject.toml and build-binary.sh so a Nuitka pin bump or flag change buckets into a fresh cache. ccache is content-addressed, so changing Python source invalidates only the .o files whose generated C actually changed. Windows is skipped because MSVC does not integrate with ccache. macOS gains a brew install step. - Pass --lto=no to Nuitka. LTO roughly doubles link time on gcc 11 and the runtime win is not worth paying on every tag push. Also drops the redundant --standalone flag (--onefile implies it) and prints ccache stats after each build for visibility into hit rate. Signed-off-by: Sodawyx <sodawyx@126.com>
This change comments out the Windows AMD64 build configuration due to long compilation times caused by MSVC not being able to use ccache. The build would take over 30 minutes per run on standard GitHub runners. It will be re-enabled once switched to sccache or MinGW-w64. Co-developed-by: Aone Copilot <noreply@alibaba-inc.com> Signed-off-by: Sodawyx <sodawyx@126.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Switches the CLI binary toolchain from PyInstaller to Nuitka so warm invocations hit the payload-hash cache at ~/.agentrun/cache/ and avoid the ~2s per-call re-extraction, unblocking the agent-hot-path scenario.