# Rb++ / rbgccxml 0.9

**URL:** <https://www.ruby-forum.com/t/rb-rbgccxml-0-9/177926>\
**Category:** Ruby\
**Created:** [October 26, 2009, 8:31pm UTC](https://www.ruby-forum.com/t/rb-rbgccxml-0-9/177926 "2009-10-26T20:31:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jruyle](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/d2c977/32.png) [@jruyle](https://www.ruby-forum.com/u/jruyle)\
**Post date:** [October 26, 2009, 8:31pm UTC](https://www.ruby-forum.com/t/rb-rbgccxml-0-9/177926/1 "2009-10-26T20:31:17Z")

</div>

= What is rb++ / rbgccxml?

Rb++, rbgccxml, and rice compose a suite of tools that make wrapping C++  
libraries into  
Ruby extensions as simple as possible. This is built as a replacement  
for  
SWIG-Ruby.

== What’s New

rb++:

- Core builder and writer systems rewritten to be much cleaner and  
easier  
to work with
- Functions with Callbacks
- Automatic Typedef lookup of argument and return types
- Class constants
- Class instance variables
- Auto generation of allocation strategies
- Wrapping anonymous enumerations as constants
- Command line arguments: --clean, --console, -v, -q
- Caching to speed up parsing and building phases
- Rice::Director
- Exposing Default arguments

rbgccxml:

- 1.9 compatible!
- Switched parsing from hpricot to libxml-ruby
- ArrayTypes
- FunctionType (function pointers)
- Class consts and instance variables
- Node#to\_s =\> Node#to\_cpp
- Node#file\_name =\> Node#file
- Arguments have values

plus numerous tweaks, bug fixes, etc. See the commit log for all the  
details. There have been  
a lot of API changes in both libraries since the last release.

== Notes

rbgccxml is 1.9 compatible, however, rb++ is not because Rice is not  
quite  
there.

rb++ is also not functional on Windows at this time, would appreciate it  
if  
someone wanted to look into this, otherwise I’m going to wait for the  
One-Click team to finish their work on buildling Ruby with mingw.

== Project

Documentation: [http://rbplusplus.rubyforge.org](http://rbplusplus.rubyforge.org)

Project Pages:

rb++: [GitHub - jameskilton/rbplusplus: Account name changed!](http://github.com/jameskilton/rbplusplus)  
rbgccxml: [GitHub - jameskilton/rbgccxml: Account name changed!](http://github.com/jameskilton/rbgccxml)

== Installation

This single command will grab the whole stack needed for rb++ to work.

gem install rbplusplus

The stack includes four libraries: rb++, rbgccxml, gccxml\_gem, and rice

== rb++

Rb++ makes it almost trivially easy to create Ruby extensions for C++  
library. In the simplest of cases, there is no need to ever touch C++,  
everything is done in a very simple and clean Ruby API.

== rbgccxml

RbGCCXML allows one to easily parse out and query C / C++ code. This  
library  
uses GCC-XML to parse out the C / C++ code into XML, and then  
libxml-ruby to  
parse and query that XML.

== gccxml\_gem

GCC-XML ([www.gccxml.org](http://www.gccxml.org)) is an application that takes takes the parse  
tree  
of C / C++ and constructs a very parsable and queryable XML file with  
all  
related information.

This gem includes a binary build of GCC-XML for supported platforms, to  
make  
it trivially easy to install. Platforms currently supported are:

- Linux 32 & 64 bit
- Mac OS X
- Windows via Cygwin

Linux 32 and 64 bit gems are up. Windows and Mac will come later today.

== Rice

The Ruby Interface for C++ Extensions, it provides a C++ API for working  
with ruby. More information  
available at its project page:

[http://rice.rubyforge.org](http://rice.rubyforge.org)

== Other Libraries

- libxml-ruby ([http://libxml.rubyforge.org/](http://libxml.rubyforge.org/))
- test/spec

== Notes

Released under the MIT licence.

For those familiar with py++ / pygccxml, the similarities are in  
function  
only. Rb++ / rbgccxml were written from scratch to take advantage of the  
Ruby language to it’s fullest.

Bugs, patches, feature requests, et al should be posted to the  
corresponding  
project’s Issues page on github.
