On 22/04/07, Lalo Martins <[EMAIL PROTECTED]> wrote: > Here's an interesting question... > > how hard would it be to write a C API for embedding the pypy VM in a C or C+ > + application? I have an application for which I'm working on Python > scripting, but for many reasons it would be interesting to use pypy instead.
Well, to do it at all would require attacking a small pile of details: teaching the tool chain to build a library rather than an application, supporting multiple entry points (though I guess this bit is somewhat solved by the extcompiler and the js backend, in different ways), ... nothing too impossible though. The fun part would be the integration between the application and the interpreter. If you're happy with just passing strings back and forth (equivalent to Py_RunSimpleString or whatever it's called) that's probably quite easy, but also not very interesting. To provide app-specific modules to Python, to allow Python to call your app which then calls Python again... I dunno, but this sort of thing would probably be quite a lot of work. Cheers, mwh _______________________________________________ [email protected] http://codespeak.net/mailman/listinfo/pypy-dev
