Main program, woohoo!

Doesn't actually do anything yet, natch.
2 files changed, 22 insertions(+), 0 deletions(-)

M Cargo.toml
A => src/main.rs
M Cargo.toml +1 -0
@@ 24,6 24,7 @@ rspirv = "0.5"
 # Version must match rspirv
 spirv_headers = "1.3"
 fnv = "1"
+structopt = "0.2"
 
 [dev-dependencies]
 assert_matches = "1"

          
A => src/main.rs +21 -0
@@ 0,0 1,21 @@ 
+use structopt::StructOpt;
+
+use std::fs;
+use std::path::PathBuf;
+
+/// A basic compiler for turning a toy pure functional language
+/// into SPIR-V.
+#[derive(StructOpt, Debug)]
+#[structopt(name = "chrysanthemumc")]
+struct Opt {
+    /// Input file.
+    #[structopt(name = "FILE", parse(from_os_str))]
+    input: PathBuf,
+}
+
+fn main() {
+    let opt = Opt::from_args();
+    let contents = fs::read_to_string(opt.input).expect("Could not read input file");
+    let mut output_path = opt.input.clone();
+    output_path.set_extension("spv");
+}