wiki:WikiStart/OngoingWork/RubyBindings

Ruby Bindings For Libraries

Situation

To test libraries most of the time data from log files are needed to be replayed into the library. The only supported way is right now to create an orogen component or to manually write ruby bindings.

Possible Solutions

The aim is to automatically generate ruby bindings for libraries which support typelib types

  • SWIG
    • pros
      • generates bindings to most scripting languages
      • support for std::vector
      • active community
    • cons
      • ugly interface in comparison to rb++
      • no support for types like uint8_t
      • bug in 1.3.40 (Ubuntu 10.04) returning vector and some more values as reference will result in can't modify frozen array
  • rb++/rice
    • pros
      • clean interface
      • generator for rice code
      • similar to orogen/typelib (uses ruby gccxml)
    • cons
      • no support for std::vector
      • no support for other languages
      • small community
      • everything must be insight a namespace
      • can not directly wrap global methods/variables
  • smoke

Problems

  • How to wrap typelib types?
    • can be done via Typemaps if SWIG is used
  • At the moment tbl files are generated by orogen components which would introduce a big list of dependencies
  • how to map the project name to a ruby lib name
    • project_name is already taken by the normal lib
  • How to interface ruby libs with qt libs
Last modified 7 years ago Last modified on 04/10/12 13:40:05