commit 04001ac5dbbf1138bd1029447e3b89ac3810effb Author: Nilstrieb Date: Mon Mar 22 14:50:05 2021 +0100 can write with self diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..682c6e0 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/../../../../../../:\Users\nilsh\CLionProjects\SimpleCMDChat\.idea/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/SimpleCMDChat.iml b/.idea/SimpleCMDChat.iml new file mode 100644 index 0000000..0ffcf4f --- /dev/null +++ b/.idea/SimpleCMDChat.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..efcf8cc --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..697608f --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..ec9691b --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,5 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "terminal_chat" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..7df4366 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "terminal_chat" +version = "0.1.0" +authors = ["Nilstrieb "] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..e69de29 diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..728d8ed --- /dev/null +++ b/src/main.rs @@ -0,0 +1,24 @@ +use std::io::{self, Write}; + +fn main() { + println!(" + _______ _ _ _____ _ _ +|__ __| (_) | |/ ____| | | | + | | ___ _ __ _ __ ___ _ _ __ __ _| | | | |__ __ _| |_ + | |/ _ \\ '__| '_ ` _ \\| | '_ \\ / _` | | | | '_ \\ / _` | __| + | | __/ | | | | | | | | | | | (_| | | |____| | | | (_| | |_ + |_|\\___|_| |_| |_| |_|_|_| |_|\\__,_|_|\\_____|_| |_|\\__,_|\\__| +--------------------------------------------------------------- +Version 0.1"); + let stdin = io::stdin(); + + loop { + print!("> "); + io::stdout().flush(); + let mut buffer = String::new(); + + stdin.read_line(&mut buffer); + + println!("{}", buffer); + } +}