dbus2 / zbus

Rust D-Bus crate.
Other
384 stars 88 forks source link

How to use without async #486

Closed thewh1teagle closed 1 year ago

thewh1teagle commented 1 year ago

I have a library which needs to use dbus, the library didn't written with async so currenly everything is blocking. in addition it has a python bindings, so converting everything to async is something I prefer not to do. How can I use this library in blocking mode? If it's not possible, maybe you have another idea? This is my library in Rust: rookie and the dbus function I'm trying to mimc in Rust is here in Python: browser_cookie_3#L252

zeenix commented 1 year ago

How can I use this library in blocking mode?

We provide blocking wrappers for this. Please do read the caveats mentioned.

zeenix commented 1 year ago

We also have a dedicated chapter for blocking API in our book. I'd advise you to read through the (short) book before using zbus.

thewh1teagle commented 1 year ago

Thank you very much! I learned a lot from the book and it makes everything simple