apt-cmd 0.3.0

Async library for interacting with apt commands
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use futures::stream::StreamExt;

fn main() -> anyhow::Result<()> {
    futures::executor::block_on(async move {
        let (child, packages) = apt_cmd::apt::upgradable_packages().await?;

        futures_util::pin_mut!(packages);

        while let Some(package) = packages.next().await {
            println!("package: {}", package);
        }

        Ok(())
    })
}