aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2021-03-19 13:08:07 +0100
committerGustav Sörnäs <gustav@sornas.net>2021-03-19 13:08:07 +0100
commit5efd97fbdce0cf7de71a6bf8d56ad5a5fd3225ad (patch)
tree8c8cbb150112f5184cec0517c59bb0b5b8e7da65
downloadmail-5efd97fbdce0cf7de71a6bf8d56ad5a5fd3225ad.tar.gz
initial commit
Trying out crossterm.
-rw-r--r--.gitignore1
-rw-r--r--Cargo.toml16
-rw-r--r--src/main.rs14
3 files changed, 31 insertions, 0 deletions
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 <gustav@sornas.net>"]
+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();
+}