diff --git a/.gitignore b/.gitignore index aee1f22c..5ac77889 100644 --- a/.gitignore +++ b/.gitignore @@ -18,7 +18,7 @@ Cargo.lock /classes/ /node_modules/ /out/ -/target/ +target/ pom.xml pom.xml.asc /.cljs_node_repl/ diff --git a/cli/Cargo.toml b/cli/Cargo.toml new file mode 100644 index 00000000..83950fb8 --- /dev/null +++ b/cli/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "datomish-cli" +version = "0.0.1" + +[dependencies] +[dependencies.datomish] + path = "../" \ No newline at end of file diff --git a/cli/README.md b/cli/README.md new file mode 100644 index 00000000..a860242a --- /dev/null +++ b/cli/README.md @@ -0,0 +1,8 @@ +# datomish-cli + +Note: this isn't actually doing anything and is just a placeholder to get the project structure in place. To run it locally, use: + +```` +cd cli +cargo run +```` diff --git a/cli/src/main.rs b/cli/src/main.rs new file mode 100644 index 00000000..861e8670 --- /dev/null +++ b/cli/src/main.rs @@ -0,0 +1,20 @@ +// Copyright 2016 Mozilla +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use +// this file except in compliance with the License. You may obtain a copy of the +// License at http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +use std::env; +extern crate datomish; + +// This is just a placeholder to get the project structure in place. +fn main() { + println!("Loaded {}", datomish::get_name()); + + let args: Vec = env::args().collect(); + println!("I got {:?} arguments: {:?}.", args.len() - 1, &args[1..]); +} diff --git a/src/lib.rs b/src/lib.rs index cd781274..6f682720 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,6 +8,11 @@ // CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. + +pub fn get_name() -> String { + return String::from("datomish"); +} + pub fn add_two(a: i32) -> i32 { a + 2 }