Here's a quick Perl program that writes a C program that makes a 
self-contained executable for a Parrot program.  I used as one example:

        $ parrot -o p8.pbc examples/japh/japh8.pasm
        $ perl pbc_to_c.pl j8.pbc > japh.c
        $ gcc -o japh japh.c -Iinclude -Lblib/lib -lparrot
        $ LD_LIBRARY_PATH=blib/lib ./japh
        Just another Parrot Hacker

It *should* run in a fairly cross-platform fashion, though I do have slight 
concerns about big-endian processors.

It does have the problem that it works only as well as the PBC that you give 
it.  It also relies on having libparrot available, which is currently not a 
problem for almost everyone on this list.

-- c

Attachment: pbc_to_c.pl
Description: Perl program

Reply via email to