浏览代码

initial commit

Nicolas Winkler 6 年之前
当前提交
42e3d6c22a
共有 5 个文件被更改,包括 43 次插入0 次删除
  1. 3 0
      .gitignore
  2. 4 0
      Cargo.lock
  3. 6 0
      Cargo.toml
  4. 22 0
      src/interface.rs
  5. 8 0
      src/main.rs

+ 3 - 0
.gitignore

@@ -0,0 +1,3 @@
+
+/target/
+**/*.rs.bk

+ 4 - 0
Cargo.lock

@@ -0,0 +1,4 @@
+[[package]]
+name = "bishop"
+version = "0.1.0"
+

+ 6 - 0
Cargo.toml

@@ -0,0 +1,6 @@
+[package]
+name = "bishop"
+version = "0.1.0"
+authors = ["Nicolas Winkler <nicolas.winkler@gmx.ch>"]
+
+[dependencies]

+ 22 - 0
src/interface.rs

@@ -0,0 +1,22 @@
+use std::io::{self, BufRead};
+
+pub fn run() {
+    let stdin = io::stdin();
+    for line_m in stdin.lock().lines() {
+        let line = line_m.unwrap();
+        let mut split = line.split_whitespace().collect::<Vec<&str>>();
+        run_command(split);
+    }
+}
+
+fn run_command(cmd: Vec<&str>) {
+    println!("{}", cmd[0]);
+}
+
+
+
+
+
+
+
+

+ 8 - 0
src/main.rs

@@ -0,0 +1,8 @@
+mod interface;
+
+
+fn main() {
+    interface::run();
+}
+
+