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

zbus is a heavy dependency #15

Closed
parasyte opened this issue Mar 19, 2022 · 16 comments
Closed

zbus is a heavy dependency #15

parasyte opened this issue Mar 19, 2022 · 16 comments

Comments

@parasyte
Copy link

parasyte commented Mar 19, 2022

zbus replaced dbus in edff243 and the change was requested in #4 (comment)

Some stats according to lib.rs:

Related: https://gitlab.freedesktop.org/dbus/zbus/-/issues/254

@frewsxcv
Copy link
Collaborator

If you would like to open a PR replacing it, then I'd review it

@Be-ing
Copy link
Collaborator

Be-ing commented Mar 19, 2022

Please do not replace zbus with dbus! dbus requires a C library. zbus is pure Rust.

Those statistics are misleading. They do not account for the libdbus C library and its dependencies.

@frewsxcv
Copy link
Collaborator

Maybe we could have it behind a feature flag? So you can choose one or the other

@Be-ing
Copy link
Collaborator

Be-ing commented Mar 19, 2022

If you insist, but IMO it'd be pretty silly to have two implementations of the same thing.

@frewsxcv
Copy link
Collaborator

Nah I don't insist, I'd rather have a pure-Rust dependency tree

@frewsxcv
Copy link
Collaborator

frewsxcv commented Jun 8, 2022

[(dependencies; 27 are required)](https://lib.rs/crates/zbus: 1MB + ~5–7MB (dependencies; 27 are required))

For reference: https://gitlab.freedesktop.org/dbus/zbus/-/blob/main/zbus/Cargo.toml

@frewsxcv
Copy link
Collaborator

Many zbus dependencies are optional, as per the latest release: https://gitlab.freedesktop.org/dbus/zbus/-/releases So zbus might be lighter now

@mwcampbell
Copy link

I want to push back a bit on this one, because I anticipate the same complaint about AccessKit's upcoming zbus-based AT-SPI implementation, and because I think choosing light versus dark mode is an accessibility issue in itself. While we should certainly avoid adding gratuitous complexity and code bloat, we should also keep in mind that a human interface that accommodates the needs of a variety of users is fundamentally not a simple, small problem, so it can't have a simple, small solution. Whether or not D-Bus is over-complicated, it's what we have on the free desktops, and meeting the needs of users must come first. I think dark-light is right to prefer a pure-Rust dependency tree. So @frewsxcv, you should feel free to dismiss this issue.

@Be-ing Be-ing closed this as completed Dec 5, 2022
@jacksongoode
Copy link

Is zbus any lighter today than when this issue was made? @frewsxcv

@frewsxcv
Copy link
Collaborator

I have no idea

@jacksongoode
Copy link

I think zbus is actually smaller now?

@parasyte
Copy link
Author

parasyte commented Feb 19, 2024

https://lib.rs/crates/zbus gives a rough estimate of weight. When I created this, its dependencies were estimated to be 5-7MB. It's now 10-26MB.

@jacksongoode
Copy link

Hmm, there's not really any alternative in the rust world though is there? I suppose dark-light could make z/dbus a feature that can be installed separately

@Be-ing
Copy link
Collaborator

Be-ing commented Feb 19, 2024

No, there isn't a Rust alternative to zbus. There's no actionable request here. If you don't like zbus, improve it or write an alternative.

@parasyte
Copy link
Author

It is actionable, which is different from maintainers having no interest.

@frewsxcv
Copy link
Collaborator

There is no actionable request.

@rust-dark-light rust-dark-light locked as resolved and limited conversation to collaborators Feb 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants