INNER CODE UNIT · Rust

run

ilya-zlobintsev/LACT · lact-cli/src/lib.rs:16

pub fn run(args: CliArgs) -> Result<()> {
    let rt = tokio::runtime::Builder::new_current_thread()
        .enable_all()
        .build()
        .unwrap();
    rt.block_on(async move {
        let client = DaemonClient::connect().await?;

        let ctx = CliContext {
            client,
            args: &args,
        };

        match &args.subcommand {
            CliCommand::List => list_gpus(ctx).await,
            CliCommand::Info => info(ctx).await,
            CliCommand::Stats => stats(ctx).await,
            CliCommand::Snapshot => snapshot(ctx).await,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…