diff --git a/Cargo.lock b/Cargo.lock index cef2fc0..82ed5db 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -181,6 +181,10 @@ dependencies = [ [[package]] name = "igloo_agent" version = "0.1.0" +dependencies = [ + "igloo_base", + "igloo_core", +] [[package]] name = "igloo_base" diff --git a/igloo_agent/Cargo.toml b/igloo_agent/Cargo.toml index 8bd8a21..5b40001 100644 --- a/igloo_agent/Cargo.toml +++ b/igloo_agent/Cargo.toml @@ -7,3 +7,5 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +igloo_base = {path = "../igloo_base"} +igloo_core = {path = "../igloo_core"} \ No newline at end of file diff --git a/igloo_agent/src/lib.rs b/igloo_agent/src/lib.rs index 83cba60..2364926 100644 --- a/igloo_agent/src/lib.rs +++ b/igloo_agent/src/lib.rs @@ -3,7 +3,9 @@ use std::process::{Command, Stdio}; use std::sync::mpsc::{channel, Sender}; use std::thread; -fn openocd_thread(sender: &Sender, child: std::process::Child) +use igloo_base::*; +use igloo_core::igloo_target; +fn openocd_thread(sender: Sender, child: std::process::Child) { let mut f = BufReader::new(child.stdout.unwrap()); loop @@ -43,7 +45,7 @@ fn gdb_thread(sender: &Sender, child: std::process::Child) } } -fn start_openocd_listener(sender: &Sender, board_cfg_file: &str) +fn start_openocd_listener(sender: Sender, board_cfg_file: &str) { let child = Command::new("openocd") .args(["-f", board_cfg_file]) @@ -56,7 +58,7 @@ fn start_openocd_listener(sender: &Sender, board_cfg_file: &str) thread::spawn(move || openocd_thread(sender, child)); } -fn ia_push(target: &IglooTarget) -> Result< +fn ia_push(target: &igloo_target::IglooTarget) -> Result { - + Ok(String::from("working")) } diff --git a/igloo_core/src/lib.rs b/igloo_core/src/lib.rs index 5be835e..97e700e 100644 --- a/igloo_core/src/lib.rs +++ b/igloo_core/src/lib.rs @@ -6,7 +6,7 @@ extern crate config; mod igloo_action; mod igloo_project; -mod igloo_target; +pub mod igloo_target; use igloo_base::*; use igloo_base::IglooInstType::*;