Skip to content

Conversation

@saurabh12nxf
Copy link

This PR adds the ability to create a standalone bundled version of runexec using PyInstaller, addressing #1243.

Implementation

  • Approach: PyInstaller
  • Binary Size: 17 MB
  • Dependencies: Only standard system libraries (libc, libdl, libz, libpthread)
  • Build Time: ~30 seconds

Features

✅ All core runexec features work:

  • Command execution
  • Resource limits (--memlimit, --timelimit)
  • Cgroups support
  • Container mode (on native Linux)
  • ctypes syscalls work correctly

Files Added

  • bundling_investigation/runexec.spec - PyInstaller configuration
  • bundling_investigation/build_bundle.sh - Production build script
  • bundling_investigation/test_pyinstaller.sh - Testing script
  • bundling_investigation/test_nuitka.sh - Alternative approach (reference)
  • bundling_investigation/README.md - Investigation results
  • doc/bundling.md - User documentation

Testing

Tested on Ubuntu 24.04:

  • ✅ Version check
  • ✅ Command execution
  • ✅ Resource limits
  • ✅ Cgroups
  • ✅ Container mode (except WSL overlay limitation)

Usage

cd bundling_investigation
./build_bundle.sh
./dist/runexec --version

Known Limitations

  • Container mode may not work in WSL2 due to overlay filesystem limitations (use --no-container flag)
  • Binary is architecture-specific (x86_64)

Fixes #1243

Add copyright and license information to all new bundling files
to comply with REUSE specification.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Investigate bundling BenchExec+Python

1 participant