Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider replacing dbus crate with native rust implementation #63

Open
djmaze opened this issue Jan 24, 2022 · 3 comments
Open

Consider replacing dbus crate with native rust implementation #63

djmaze opened this issue Jan 24, 2022 · 3 comments

Comments

@djmaze
Copy link

djmaze commented Jan 24, 2022

The dbus crate uses libdbus and thus makes it hard to create portable or statically compiled binaries. It would be very nice if the mpris crate could be used without C dependencies.

There are now several alternative crates for implementing dbus clients. For example, here is a list (including benchmarks). Maybe this crate could use one of those instead?

@Mange
Copy link
Owner

Mange commented Jan 24, 2022

Very nice. I'm glad the ecosystem has expanded since I started working on this.

I agree. I might experiment a bit with this some time.

Does it make sense to have the backend pluggable using feature flags, or would it be better that we just pick one and use that one to not over-engineer anything?

@djmaze
Copy link
Author

djmaze commented Jan 24, 2022

Cool! Personally, I don't see any advantages in having a pluggable backend. Sounds like much work for probably no gain in practice.

(Disclaimer, I am pretty new to Rust and not yet skilled in the language's best practices. So my opinion in this case is probably not of the highest value.)

@ssokolow
Copy link

ssokolow commented Sep 8, 2022

Does it make sense to have the backend pluggable using feature flags, or would it be better that we just pick one and use that one to not over-engineer anything?

I've run into situations where I felt forced into choosing one implementation because the alternative was having two D-Bus implementations in the same binary. I could easily imagine myself running into a situation where I have no choice because two crates have decided they don't need feature flags and chose different implementations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants