[haXe] PHP to FFI wrapper - possible?

Nicolas Cannasse ncannasse at motion-twin.com
Fri Apr 21 15:56:08 CEST 2006


> Just a thought...
> 
> The most important missing library for haXe/NEKO (for me) right now, is
> image manipulation, like, say, PD for PHP. Although I'm also missing other
> stuff, like a PDF library, for example.
> 
> I'm sure there are countless other libraries missing for everyone else.

Well not so many I think but the image one has been already quoted
several times :)

> So rather than having 20 different programmers creating FFI wrappers for
> every imaginable library out there, how about simply writing one generic
> wrapper for all existing PHP modules?
> 
> I don't know enough C/C++ to know if that's possible, but if it were...

It's not so much possible, since the wrappers are quite specific to the
Virtual Machine. Also, writing wrappers for Neko is a lot more easier
than for PHP, if you have some basic C knowledge you can have a look at
the Neko FFI there : http://nekovm.org/doc/ffi

Interfacing libraries does not take so much time usually. It depends of
course of the size of the API you're trying to export to Neko.

After that all you need an additional small haXe wrapper.

Nicolas



More information about the Haxe mailing list