Wednesday, 21 May 2014

Creating a jruby extension as a gem

What's an extension:-

Many MRI gems use extensions to wrap libraries that are written in C with a ruby wrapper. Examples include nokogiri which wraps libxml2 and libxslt, pg which is an interface to the PostgreSQL database and the mysql and mysql2 gems which provide an interface to the MySQL database. This above was copied from a guide to creating a gem with extensions. In jruby java alternatives are preferred.

A jruby extension can act as a wrapper for a java library

The Apache commons-math library is an example of such a library, here is gem I've created as a jruby extension.

No comments:

Post a Comment