ANN: Compyler 0.1

G

Grant Olson

Compyler is a pre-alpha x86 native code compiler. So far it can generate
primitive .pyds but not standalone executables. It can run some simple test
cases including pystones (although there is a memory leak there). And no, I
don't expect it'll ever be much faster than Cpython <wink>. I was primarily
interested in being able to distribute low-footprint standalone executables
written in python and code obfustication.

The basic approach taken by compyler is to transliterate python bytecode
into x86 assembly, instead of trying to generate assembly from the syntax
tree.

This is basically abandonware. I haven't touched this in six months, but
did do a lot of up front work. I basically wanted to release it before my
hardrive blows up in case anyone was looking for prior art.

The code also contains a version of pyasm that has some more patches and
features than the official distribution if you're one of pyasm's 3 users.

More info can be found at:

http://members.verizon.net/~olsongt/compyler/index.html


-Grant
 
O

olsongt

Grant said:
In what ways is this similar or different to Shed Skin?http://mark.dufour.googlepages.com/

--Irmen

I've never actually downloaded shedskin, but my understanding is that
it:

+ does type inference for speed, but means you're working with a
subset of python.

+ Generates C++ so you need an intermediate compiler (probably only
an issue on windows)

+ Generates code via the AST.

OTOH, compyler:

+ has the exact same semantics as compiler code. I was more
concerned with this than performance payoffs.

+ generates .COFF files that are ready for linking.

+ Skips syntax tree processing and just assumes the default bytecode
is a good enough starting point.

I was going to say you couldn't make a .pyd in ShedSkin, but it looks
like you can do that too.

-Grant
 
S

srepmub

+ Generates C++ so you need an intermediate compiler (probably only
an issue on windows)

Shed Skin comes with a stripped down MingW/G++, so compiling and
running/importing compiled code is as easy as 'ss blah.py; make run'
or 'ss -e blah.py; python; import blah' under both Windows and Linux
(in theory, of course).


Mark Dufour (Shed Skin author).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top