Posted on | October 2, 2007 | 2 Comments
I have a new toy, the Roadsend PHP compiler. I really, really like my new toy
Roadsend does something neat, they take Zend PHP completely out of the picture. Roadsend comes with its own PHP library, which is released under the GNU LGPL2 license. This allows you to license your stuff (basically) any way that you see fit, even if you write proprietary applications.
The Roadsend compiler itself is licensed under the GNU GPL v2 license. Wow, a way to a geeks heart is truly through the license.
I downloaded the source to the compiler. It needs something called bigloo which is also freely available. It took about an hour to build everything and install it, bigloo is , well, big I had no problems getting up and running with Roadsend on my Ubuntu desktop.
Folks, this compiler is really neat, it lets you build ELF applications from php source, without talking to Zend PHP at all. This means, you can build :
- Statically linked (larger) FastCGI applications that don’t need shared objects to run.
- Dynamically linked (small) FastCGI applications.
- PHP/GTK for making neat desktop applications with PHP.
- Compile (virtually) any PHP4/PHP5 application into a nice sensible binary executable.
I’m currently using it to write mostly utilities, things that parse log files or other back-end stuff. Even statically linked, the executables are around 3 – 4 mb, vs 12 mb + for a standard PHP executable.
Roadsend comes with a micro web server, this means that you can compile your programs complete with a micro HTTP server that can serve the program via web. How cool is that?
People have been reporting success using Roadsend to compile PHPBB, PhpMyAdmin and other popular applications. I need to get a better feel for how this thing works before I try anything major, right now I’m just delighted to be able to use PHP just like “any other unix-like scripting language” with about the same overhead. I could not do that with Zend, unless I custom built a tiny version of PHP for every single thing that I wanted to do.
There’s a more comprehensive feature list available on their web site. Check it out.
I have not really dug into the source of the compiler, I plan to do this soon. I want to see how the PHP libs manage memory vs Zend PHP. I’ll post again once I’ve done this, it will be a while