Skip to content
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

Investigate Options for Cross-Platform Standalone Static Binaries #43

Open
skyl opened this issue Nov 14, 2024 · 2 comments
Open

Investigate Options for Cross-Platform Standalone Static Binaries #43

skyl opened this issue Nov 14, 2024 · 2 comments

Comments

@skyl
Copy link
Owner

skyl commented Nov 14, 2024

Problem

The current build process for corpora_cli/main.py does not produce standalone static binaries, which is necessary for ensuring portability and ease of deployment across different environments. The primary target is arm64 Linux, but a build matrix supporting multiple platforms is required.

Goal

Identify and implement a build process that generates truly standalone static binaries for corpora_cli/main.py. These binaries should be cross-platform and not rely on external dependencies.

Context

  • Current build script: py/genall.sh
  • Existing setup does not produce static binaries.
  • Key platforms: arm64 Linux, and potentially others depending on project needs.

Considerations

  • Static Linking: Use of libraries like musl for static linking to ensure binaries are standalone.
  • Cross-Compilation: Creation of a build matrix that can target multiple platforms, potentially including x86 and other architectures.
  • Compilation Tools: Evaluate tools like Nuitka and other Python-to-C compile toolchains for efficiency and compatibility.

Options

  1. Musl and Nuitka: Explore leveraging musl libc for static linking on Unix-like OSes, with Nuitka for C-based compilation.
  2. PyInstaller: Investigate if PyInstaller can achieve fully static builds, despite its typical reliance on glibc.
  3. Cython: Consider translating Python to C for potential static compilation.

Action Items

  1. Research and document potential solutions for achieving truly standalone static binaries for corpora_cli/main.py.
  2. Experiment with different toolchains and document results.
  3. Implement and integrate a suitable solution into the current build process, updating documentation and scripts as necessary.

Outcome

Delivery of a reliable build process that consistently produces cross-platform, standalone static binaries, enhancing the portability and deployment of the corpora_cli tool.

@skyl
Copy link
Owner Author

skyl commented Nov 16, 2024

fully static rust binary #44 - now just need to write the CLI in rust ;9

@skyl
Copy link
Owner Author

skyl commented Nov 20, 2024

#60 - got one static binary with OpenSSL now - arm64 linux at least.

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

No branches or pull requests

1 participant