Skip to main content

StaticX Build Status PyPI

Bundle dynamic executables with their library dependencies so they can be run anywhere, just like a static executable.

Requirements

StaticX currently works only with Linux 64-bit dynamic executables.

The following external tools need to be installed to run StaticX:

  • ldd - Part of GNU C Library
  • readelf - Part of binutils
  • objcopy - Part of binutils
  • patchelf
    • Packages available for Debian 8+, Fedora 14+, others
    • install with pip install patchelf-wrapper

The following additional tools must be installed to build StaticX from source:

Installation

From PyPI

StaticX is avaiable on PyPI. The wheels are built on Travis CI and include a bootloader built with musl-libc.

You can install using Pip. StaticX is compatible with Python 2.7 (pip) or Python 3.4+ (pip3):

sudo pip3 install staticx

From source

If you have musl libc installed, you can use it to build the staticx bootloader, resulting in smaller, better binaries. To do so, set the BOOTLOADER_CC environment variable to your musl-gcc wrapper path wehn invoking pip or setup.py:

sudo BOOTLOADER_CC=/usr/local/musl/bin/musl-gcc pip3 install https://github.com/JonathonReinhart/staticx/archive/master.zip
cd staticx
sudo BOOTLOADER_CC=/usr/local/musl/bin/musl-gcc pip3 install .

Usage

Basic wrapping of an executable

staticx /path/to/exe /path/to/output

Including additional library files with the package (any number can be specified by repeating the -l option)

staticx -l /path/to/fancy/library /path/to/exe /path/to/output

Run-time Information

StaticX sets the following environment variables for the wrapped user program:

  • STATICX_BUNDLE_DIR: The absolute path of the "bundle" directory, the temporary dir where the archive has been extracted.
  • STATICX_PROG_PATH: The absolute path of the program being executed.

License

This software is released under the GPLv2, with an exception allowing the bootloader to be distributed. See LICENSE.txt for more details.

Metadata

Release files for staticx 0.9.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for staticx 0.9.1
File Size Uploaded Provenance
staticx-0.9.1.tar.gz 56.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for staticx 0.9.1
File Interpreter ABI Platform
staticx-0.9.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 202.8 kB

Release files / staticx-0.9.1.tar.gz

Download URL staticx-0.9.1.tar.gz
Size 56.3 kB
Tags Source
SHA-256 checksum
How to use checksums
95b4390cac7e6c5a460ed24af2cb7d516384fcfecf085af73323c40b58e1aaf3
BLAKE2b-256 checksum
How to use checksums
ebc29cd485aa22131d1836f51315c7d2434b7e161ec118083fd1ad3019127245
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/2.7.15

Release files / staticx-0.9.1-py2.py3-none-any.whl

Download URL staticx-0.9.1-py2.py3-none-any.whl
Size 146.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
adac4edca1ba2e57ee3673a24805d33e6f4bd6ba393014319f1b54409977e59c
BLAKE2b-256 checksum
How to use checksums
95636d696e59810ab81a4a4105afb81380dff86f934e9964986b9c6e473137ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/2.7.15

Security for staticx 0.9.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.9.1 This release

2 release files No provenance

0.3.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page