Debian Codegraph @

/

debian rust-libsystemd 0.5.0-2debian librust-libsystemd-dev debian librust-libsystemd+default-dev debian librust-libsystemd-0-dev debian librust-libsystemd-0+default-dev debian librust-libsystemd-0.5-dev debian librust-libsystemd-0.5+default-dev debian librust-libsystemd-0.5.0-dev debian librust-libsystemd-0.5.0+default-dev cargo libsystemd 0.5.0 debianjsonmakefilemarkdownrustrustrust-c-abishelltomlyaml 32 files · 447 symbols
View dependency graph

Depends on

  • dh-cargo (dh-sequence-cargo)
  • rust-hmac-0.12 (librust-hmac-0.12+default-dev)
  • rust-libc (librust-libc-0.2+default-dev)
  • rust-log (librust-log-0.4+default-dev)
  • rust-nix (librust-nix-0.30+default-dev, librust-nix-0.30+fs-dev, librust-nix-0.30+process-dev, librust-nix-0.30+socket-dev, librust-nix-0.30+uio-dev)
  • rust-once-cell (librust-once-cell-1+default-dev)
  • cargo, debhelper-compat, librust-nom-7+default-dev, librust-serde-1+default-dev, librust-serde-1+derive-dev, librust-sha2-0.10+default-dev, librust-thiserror-1+default-dev, librust-uuid-1+default-dev, librust-uuid-1+serde-dev, libstd-rust-dev, rustc
README (full)

libsystemd

crates.io LoC Documentation

A 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.

Example

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.

License

Licensed under either of

at your option.

dir .github/
dir debian/
dir examples/
dir src/
dir tests/
file .cargo_vcs_info.json
file COPYRIGHT
file Cargo.lock
file Cargo.toml
file Cargo.toml.orig
file LICENSE-APACHE-2.0
file LICENSE-MIT
file README.md