srwalter / dbus-bytestream

Native D-Bus implementation for Rust
GNU Lesser General Public License v2.1
6 stars 4 forks source link

Plans for service-side APIs? #4

Open mathstuf opened 8 years ago

mathstuf commented 8 years ago

It appears this is only for communicating over D-Bus, not for setting up a service on the bus.

Related, any plans for converting from an XML description to a Rust skeleton (c.f., qdbusxml2cpp from Qt)?

srwalter commented 8 years ago

You currently can create a service on the bus, just by receiving messages and processing them. Admittedly, that's a fairly low-level API, but it works well for simple cases.

We're looking at options for using e.g. macros to conveniently expose rust methods over D-Bus. Stay tuned for that :-)

mathstuf commented 8 years ago

FYI, I have this built on top of dbus-rs right now. Would like to move to a pure-Rust version at some point. I don't expect my approach is going to be very idiomatic, but feel free to take ideas :) . I may write tools to generate code from XML too; will have to see how messy the code gets.

mathstuf commented 8 years ago

So I tried porting the ez-dbus library to dbus-bytestream, but the mut requirement to send a message seems to get in the way :( . It seems dbus-rs gets away with it by hiding all the mut behind the FFI and unsafe blocks :/ .