A pure-Rust client library to work with systemd
See the codeA pure-Rust client library to work with systemd.
It provides support to interact with systemd components available on modern Linux systems. This crate is entirely implemented in Rust, and does not require the libsystemd C library.
NB: this crate is not yet features-complete. If you don't care about C dependency, check rust-systemd instead.
extern crate libsystemd;
use libsystemd::daemon::{self, NotifyState};
fn main() {
if !daemon::booted() {
panic!("Not running systemd, early exit.");
};
let sent = daemon::notify(true, &[NotifyState::Ready]).expect("notify failed");
if !sent {
panic!("Notification not sent, early exit.");
};
std::thread::park();
}
Some more examples are available under examples.
Licensed under either of
at your option.
155 followers · starred Nov 2023
779 followers · starred Jan 2024
168 followers · starred May 2026
47 followers · starred Nov 2022
A pure-Rust client library to work with systemd
See the codeA pure-Rust client library to work with systemd.
It provides support to interact with systemd components available on modern Linux systems. This crate is entirely implemented in Rust, and does not require the libsystemd C library.
NB: this crate is not yet features-complete. If you don't care about C dependency, check rust-systemd instead.
extern crate libsystemd;
use libsystemd::daemon::{self, NotifyState};
fn main() {
if !daemon::booted() {
panic!("Not running systemd, early exit.");
};
let sent = daemon::notify(true, &[NotifyState::Ready]).expect("notify failed");
if !sent {
panic!("Notification not sent, early exit.");
};
std::thread::park();
}
Some more examples are available under examples.
Licensed under either of
at your option.
155 followers · starred Nov 2023
779 followers · starred Jan 2024
168 followers · starred May 2026
47 followers · starred Nov 2022