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

📝 book: Add a simpler D-Bus signals example #521

Merged
merged 2 commits into from
Dec 11, 2023

Conversation

intgr
Copy link
Contributor

@intgr intgr commented Dec 10, 2023

I'm unfamiliar with both D-Bus and Rust. I found the current signals example in the zbus book, which uses GeoClue, too complicated for getting started. So I figured I would contribute a simpler one.

The example monitors for new systemd services starting (interface org.freedesktop.systemd1.Manager signal JobNew).

I also added it as zbus/examples/watch-systemd-jobs.rs so it can be executed with cargo run --example watch-systemd-jobs.

Also updated the Stream trait link to point to latest futures library version.

Copy link
Contributor

@zeenix zeenix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for this! It's a big improvement.

Since you'll be addressing the nit, if you could please add emoji prefixes to the commits as per the recommendation in our guideline, that'd be great (it's not compulsory).

book/src/client.md Outdated Show resolved Hide resolved
zbus/examples/watch-systemd-jobs.rs Outdated Show resolved Hide resolved
@intgr intgr changed the title book: Add a simpler D-Bus signals example 📝 book: Add a simpler D-Bus signals example Dec 11, 2023
@intgr intgr force-pushed the simpler-signals-example branch from b07de50 to 745d3d0 Compare December 11, 2023 18:16
@intgr
Copy link
Contributor Author

intgr commented Dec 11, 2023

please add emoji prefixes to the commits

Sorry, my bad for not reading the contributor guideline. Fixed.

@intgr intgr requested a review from zeenix December 11, 2023 18:17
@intgr intgr force-pushed the simpler-signals-example branch 2 times, most recently from 23aa3b9 to 4991a5b Compare December 11, 2023 18:21
I found the current signals example in the zbus book, which uses
GeoClue, too complicated for getting started. So I figured I would
contribute a simpler one.

The example monitors for new systemd services starting (interface
org.freedesktop.systemd1.Manager signal JobNew).

I also added it as zbus/examples/watch-systemd-jobs.rs so it can be
executed with `cargo run --example watch-systemd-jobs`
@intgr intgr force-pushed the simpler-signals-example branch from 4991a5b to 481631b Compare December 11, 2023 18:22
Copy link
Contributor

@zeenix zeenix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@zeenix zeenix enabled auto-merge December 11, 2023 18:44
@zeenix zeenix merged commit c089c38 into dbus2:main Dec 11, 2023
7 checks passed
@intgr intgr deleted the simpler-signals-example branch December 11, 2023 19:52
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

Successfully merging this pull request may close these issues.

2 participants