diff --git a/bin/map/Cargo.toml b/bin/map/Cargo.toml new file mode 100644 index 000000000..c19092b91 --- /dev/null +++ b/bin/map/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "map" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +darkfi = { path = "../../" , features = ['tui']} +smol = "1.2.5" diff --git a/bin/map/src/main.rs b/bin/map/src/main.rs new file mode 100644 index 000000000..199eb25dc --- /dev/null +++ b/bin/map/src/main.rs @@ -0,0 +1,31 @@ +// tui that lists: +// all active nodes +// their connections +// recent messages +// +// uses rpc to get that info from nodes +// +// later: can open nodes in tabs + +use drk::{ + tui::{App, HBox, VBox, Widget}, + Result, +}; + +async fn start() -> Result<()> { + let wv1 = vec![Widget::new("Active nodes".into())?]; + + let v_box1 = Box::new(VBox::new(wv1.clone(), 1)); + + let mut app = App::new()?; + + app.add_layout(v_box1)?; + + app.run().await?; + + Ok(()) +} + +fn main() -> Result<()> { + smol::future::block_on(start()) +}