Skip to content

Limitations

Current constraints of cosmofy and Cosmopolitan Python.

Pure Python Only

Currently, cosmofy can only bundle pure-Python packages. Packages with C extensions are not supported.

Works:

  • Pure Python packages
  • Packages using ctypes to load system libraries

Does not work:

  • NumPy, Pandas, and other packages with compiled extensions
  • Packages requiring Cython compilation

See #94 for progress on C extension support.

Python Version

Bundles use the Cosmopolitan Python version from cosmo.zip, currently Python 3.12.

Custom Python versions are not currently supported. See #44.

Bytecode Compilation

Bytecode compilation (.pyc files) is available but not enabled by default. Use --compile-bytecode to enable it:

uvx cosmofy bundle --compile-bytecode

This trades slightly larger bundle size for faster import times.

Platform-Specific Features

Some platform-specific features may behave differently:

  • File paths - Cosmopolitan normalizes paths across platforms
  • Process spawning - Some multiprocessing patterns may differ
  • Native libraries - System library loading varies by platform

Bundle Size

Bundles include a full Python interpreter, so minimum size is ~15-20MB.

Tips to reduce size:

  • Only include necessary dependencies
  • Use --entry to bundle specific entry points
  • Consider using a .args file to share one Python bundle

Self-Updater Security

The self-updater verifies binary hashes but does not cryptographically sign receipts. See Self-Updater Security.

Receipt signing is planned for a future release (#53).