systemd-run

Crates.iosystemd-run
lib.rssystemd-run
version0.9.0
sourcesrc
created_at2022-07-13 08:50:28.317359
updated_at2024-11-06 11:08:33.314026
descriptionA Rust crate for running processes as Systemd transient services.
homepage
repositoryhttps://github.com/xdu-icpc/rust-systemd-run
max_upload_size
id624941
size118,851
Xi Ruoyao (xry111)

documentation

README

systemd_run

This is the crate for running processes as Systemd transient services.

Status: Highly unstable, at early development cycle.

Example code

This code starts /bin/true as a Systemd transient service, running in the per-user service manager of your login session, and wait for it to finish.

#[async_std::main]
async fn main() -> std::result::Result<(), Box<dyn std::error::Error>> {
	let status = systemd_run::RunUser::new("/bin/true")
		.start()
		.await?
		.wait()
		.await?;
	dbg!(status);
	Ok(())
}
Commit count: 152

cargo fmt