From 5efd97fbdce0cf7de71a6bf8d56ad5a5fd3225ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Fri, 19 Mar 2021 13:08:07 +0100 Subject: initial commit Trying out crossterm. --- .gitignore | 1 + Cargo.toml | 16 ++++++++++++++++ src/main.rs | 14 ++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.toml create mode 100644 src/main.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..ca3f1c3 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "mail" +version = "0.1.0" +authors = ["Gustav Sörnäs "] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +crossterm = "0.19" # terminal control (cursor, style) +termimad = "0.10" # markdown renderer + +notmuch = "0.6" + +[profile.release] +lto = "thin" diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..7c12a7c --- /dev/null +++ b/src/main.rs @@ -0,0 +1,14 @@ +use std::io::{Write, stdout}; +use crossterm::{cursor, execute, terminal}; + +fn main() { + let mut stdout = stdout(); + + execute!(stdout, terminal::Clear(terminal::ClearType::All)).unwrap(); + execute!(stdout, cursor::MoveTo(5, 5)).unwrap(); + write!(stdout, "wowee").unwrap(); + execute!(stdout, cursor::MoveTo(5, 7)).unwrap(); + write!(stdout, "eewow").unwrap(); + execute!(stdout, cursor::MoveTo(5, 7)).unwrap(); + write!(stdout, "WOWEE").unwrap(); +} -- cgit v1.2.1