NAME
Actually Portable Perl (APPerl)
DESCRIPTION
Actually Portable Perl (APPerl) is a distribution of Perl the 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.
FEATURES
- Runs on six operating systems with the same binary!
- Full build of Perl 5, perl modules, C extensions, and all under 24 MiB, Small build under 5 MiB
- Polygot binary format is also a ZIP file allowing for easy inspection and modification with standard tools
- Scripts can be embedded and ran from inside the executable:
./perl.com /zip/bin/perldoc Perl::Dist::APPerl
argv[0]
script execution allows for easy creation of single file applications:
ln -s perl.com perldoc.com && ./perldoc.com Perl::Dist::APPerl
apperlm
tool enables building custom APPerl versions and applications with and without building Perl from source
RELEASES
APPerl releases are available in the Perl::Dist::APPerl repository. apperlm
, APPerl Manager (useful for creating custom builds and APPerl applications) is available on CPAN: Perl::Dist::APPerl. apperlm
is also packaged inside of full builds of APPerl for convenience; see BOOTSTRAPPING.
Latest Release Builds
On Unix-like systems, you must make them executable before you can run them:
chmod +x perl.com
perl.com
- The full release of APPerl, perl built with all default modules and C extensions.perl-small.com
- Slimmed down build of APPerl, no perldoc.perl-vista.com
- Full APPerl, with Vista/7 support from an unofficial Cosmopolitan Libc forkperl-small-vista.com
- Small APPerl, with Vista/7 support from an unofficial Cosmopolitan Libc fork
Releases
Running under pledge
If running third-party binaries makes you nervous, APPerl can be ran with pledge under Linux (pledge.com
can be built from the source in the Cosmopolitan Libc repo).
cp perl.com perl
./perl --assimilate
./pledge.com -p 'stdio rpath tty' ./perl -e 'print("hello world\n");'
./pledge.com -p 'stdio rpath tty cpath proc exec prot_exec tmppath' ./perl /zip/bin/perldoc Perl::Dist::APPerl
DOCUMENTATION, SOURCE CODE, AND SUPPORT
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.
ACKNOWLEDGEMENTS
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.
AUTHOR
Gavin Hayes - my email and profiles are in the footer.
LICENSE AND COPYRIGHT
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.
from Hacker News https://ift.tt/r1UAjO6
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.