feat: create colmena library

This commit is contained in:
soyouzpanda 2024-10-10 21:04:01 +02:00
parent e956ae403b
commit 94b1a11326
Signed by: ecoppens
GPG key ID: 871893E37A732093
4 changed files with 26 additions and 2 deletions

View file

@ -51,3 +51,11 @@ features = [
"rt-multi-thread",
"sync",
]
[[bin]]
name = "colmena"
path = "src/main.rs"
[lib]
name = "colmena"
path = "src/lib.rs"

16
src/lib.rs Normal file
View file

@ -0,0 +1,16 @@
#![allow(dead_code)]
mod cli;
mod command;
mod error;
mod job;
mod nix;
mod progress;
mod troubleshooter;
mod util;
pub use nix::host::generic::Request as GenericRequest;
pub use nix::host::generic::Response as GenericResponse;
pub use nix::host::CopyOptions;
pub use nix::key::{Key, UploadAt};
pub use nix::store::StorePath;

View file

@ -3,7 +3,7 @@ use std::process::Stdio;
use async_trait::async_trait;
use serde::{Deserialize, Serialize};
use tokio::io::{AsyncBufReadExt, AsyncReadExt, AsyncWriteExt, BufReader, BufWriter};
use tokio::io::{AsyncBufReadExt, AsyncWriteExt, BufReader, BufWriter};
use tokio::process::{Child, ChildStdin, ChildStdout, Command};
use super::{CopyDirection, CopyOptions, Host, RebootOptions};

View file

@ -15,7 +15,7 @@ pub use local::Local;
mod key_uploader;
mod generic;
pub mod generic;
pub use generic::GenericHost;
#[derive(Copy, Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]