| About | APPerl


Actually Portable Perl (APPerl)


Actually Portable Perl (APPerl) is a distribution of Perl that runs on several x86_64 operating systems (most Unix-like and Windows) via the same binary. It builds to a single binary with perl modules packed inside of it.

Cross-platform, single binary, standalone Perl applications can be made by building custom versions of APPerl, with and without compiling Perl from scratch, so it can be used an alternative to PAR::Packer. APPerl could also easily be added to development SDKs, carried on your USB drive, or just allow you to run the exact same perl on all your PCs multiple computers.

Information on the creation of APPerl can be found in this blogpost.



Latest Release Builds

apperlm (APPerl Manager) is available on CPAN: Perl::Dist::APPerl
apperlm is also packaged inside of full builds of APPerl for convenience; see BOOTSTRAPPING.

Releases (on GitHub)


unix-like notes and troubleshooting

You must make the binary executable before it can be ran:
chmod +x

Actually Portable Executables(APEs) such as APPerl, must be run from a Thompson Shell compatible shell such as bash. On some Linux environments (such as WSL), you may need to fiddle with binfmt_misc. Cosmopolitan Libc README

APEs automatically extract and install the APE Loader if it is not found. Usually, the APE Loader is installed to $HOME/.ape. In order to run an APE, the APE Loader must be executable (not stored on a noexec mount). See APE Loader.

APEs can sidestep the APE loader by converting to the native binary format (e.g. ELF, Mach-O):
cp perl && ./perl --assimilate . Of course, this makes them no longer APEs.

Running under pledge

If running third-party binaries makes you nervous, APPerl can be ran with pledge under Linux ( can be built from the source in the Cosmopolitan Libc repo).

cp perl
./perl --assimilate
./ -p 'stdio rpath tty' ./perl -e 'print("hello world\n");'
./ -p 'stdio rpath tty cpath proc exec prot_exec tmppath' ./perl /zip/bin/perldoc Perl::Dist::APPerl


Support and bug reports should be filed as issues at the Perl::Dist::APPerl repo. Pull Requests are welcome at the repos. The Cosmopolitan Libc is a third-party project, be sure to read the guidelines there if contributing there.

Fixes to the cosmo platform in the perl source should be done on top of the cosmo branch. Improvements to APPerl, but unfit to be merged into official perl should be done on top of the cosmo-apperl branch. Ideally someday we'll get the cosmo platform merged into official perl.


APPerl shares the Cosmopolitan Libc discord.


The Cosmopolitan Libc contributors, especially Justine Tunney and Gautham Venkatasubramanian. APPerl wouldn't be possible without Actually Portable Executables and polyfills of several Linux and POSIX APIs for other platforms. Gautham's Python port inspired this project.


Gavin Hayes - my email and profiles are in the footer.

This software is copyright (c) 2022 by Gavin Hayes.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.