# \[ANN\] R-Bus, a native Ruby implementation of D-Bus

**URL:** <https://www.ruby-forum.com/t/ann-r-bus-a-native-ruby-implementation-of-d-bus/90116>\
**Category:** Ruby-Gnome 2\
**Created:** [March 26, 2007, 5:57am UTC](https://www.ruby-forum.com/t/ann-r-bus-a-native-ruby-implementation-of-d-bus/90116 "2007-03-26T05:57:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stoffe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/85e7bf/32.png) [@stoffe](https://www.ruby-forum.com/u/stoffe)\
**Post date:** [March 26, 2007, 5:57am UTC](https://www.ruby-forum.com/t/ann-r-bus-a-native-ruby-implementation-of-d-bus/90116/1 "2007-03-26T05:57:51Z")

</div>

Hello,

just put the source code up at the project page at Rubyforge. Finally  
found the time to clean it up a bit and polish the docs a little.

R-Bus is a native Ruby implementation of the D-Bus protocol, with  
these goals in mind:

- Ruby + standard library is the only dependencies
- A Rubyish API, approach and way of doing things
- Complete client functionality
- A comprehensive test suite

Homepage: [http://rbus.rubyforge.org/](http://rbus.rubyforge.org/)  
Subversion: svn checkout svn://rubyforge.org/var/svn/rbus/trunk rbus  
API, tutorial, etc: [http://rbus.rubyforge.org/doc/](http://rbus.rubyforge.org/doc/)

The license is GPL.

No gems or tarballs yet, as I want some eyes on both API and code  
first, it’d be much appreciated!

Current status is that it covers pretty much all client functionality  
apart from exporting objects, which should be one of the things next  
on the list.

It has support for a threaded event loop as well as using the GLib one  
with the Ruby-GNOME2 bindings. There was some concern earlier over  
threads, but it works really well so far, and the native Java  
implementation seems to have a similar approach. It should also be  
possible to add more loop types without too much problem, I hope.

There are some more things that are missing here and there, but what  
is needed most of all is lots, no _LOTS_ of testing. There’s sure to  
be plenty of things that do not work as they should, especially in  
complex marshaling combinations. Also it’s all just tested on one  
Linux machine so far, so “worked on my machine”-syndrome is probably  
more fact than possibility. 😉

Both more automated tests as well as example scripts and applications  
would be more than welcome - also useful scripts in other languages  
than Ruby would be cool, so they could be translated for testing  
purposes. See the examples directory for some currently working stuff.

There’s plenty more to tell, I’m sure, but for the ones interested,  
there’s plenty of docs and code to check out, and of course, feel free  
to ask any questions you may have. Everyone’s invited. 😉

Sorry it took so long, for those who may have waited.

Have fun!

– Stoffe

## – Kristoffer LundÃ©n âœ‰ removed\_email\_address@domain.invalid âœ‰ removed\_email\_address@domain.invalid [http://www.gamemaker.nu/](http://www.gamemaker.nu/) â˜Ž 0704 48 98 77

Take Surveys. Earn Cash. Influence the Future of IT  
Join [SourceForge.net](http://SourceForge.net)’s Techsay panel and you’ll get the chance to share  
your  
opinions on IT & business topics through brief surveys-and earn cash  
[http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV](http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV)

---

<div class="post-metadata">

**Author:** ![stoffe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/85e7bf/32.png) [@stoffe](https://www.ruby-forum.com/u/stoffe)\
**Post date:** [March 27, 2007, 1:18am UTC](https://www.ruby-forum.com/t/ann-r-bus-a-native-ruby-implementation-of-d-bus/90116/2 "2007-03-27T01:18:22Z")

</div>

On Mon, 2007-03-26 at 05:56 +0200, Kristoffer LundÃ©n wrote:

> - Complete client functionality
> 
> There are some more things that are missing here and there, but what
> 
> There’s plenty more to tell, I’m sure, but for the ones interested,  
> there’s plenty of docs and code to check out, and of course, feel free  
> to ask any questions you may have. Everyone’s invited. 😉
> 
> Sorry it took so long, for those who may have waited.
> 
> Have fun!

Hey, very cool. I had a quick look at the tutorial. About the only  
thing I can comment on is this section:

As an extra convenience, if the name and the path has the same  
components, the latter can be omitted and will be auto-generated.

# get ‘/org/freedesktop/Notifications’ object from Notifications

notify = bus.get\_object(‘org.freedesktop.Notifications’)

Similarities between the object path and bus name are purely  
coincidental. Actually encoding this relationship is in my opinion not  
ideal.

–  
John (J5) Palmieri [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

* * *

Take Surveys. Earn Cash. Influence the Future of IT  
Join [SourceForge.net](http://SourceForge.net)’s Techsay panel and you’ll get the chance to share  
your  
opinions on IT & business topics through brief surveys-and earn cash  
[http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV](http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV)

---

<div class="post-metadata">

**Author:** ![stoffe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/85e7bf/32.png) [@stoffe](https://www.ruby-forum.com/u/stoffe)\
**Post date:** [March 27, 2007, 8:00am UTC](https://www.ruby-forum.com/t/ann-r-bus-a-native-ruby-implementation-of-d-bus/90116/3 "2007-03-27T08:00:47Z")

</div>

Hello,

On 3/27/07, John (J5) Palmieri [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > 
> 
> Hey, very cool.

Thanks!

> Similarities between the object path and bus name are purely  
> coincidental. Actually encoding this relationship is in my opinion not  
> ideal.

Fair enough. It seemed like a common enough practice for applications  
that only exports one object, that it would be useful with a shortcut.  
No biggie though, I can remove that. 🙂

Thanks for the input,

– Stoffe
