diff --git a/src/main.rs b/src/main.rs index 5e0d957..f60e0c8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,10 +4,12 @@ mod vm; use crate::vm::VM; +use std::env; fn main() { - let mut vm = VM::new(); + let args : Vec<_> = env::args().collect(); - vm.read_program(&"programs/hello-world.obj".to_string()); + let mut vm = VM::new(); + vm.read_program(args.get(1).expect("No program file given")); vm.execute(); }