diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 639e675..2e9ee5f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -38,9 +38,10 @@ fn main() { let mut file_to_execute: Option<String> = None; - let mut bind_files: Vec<String> = vec![]; + let mut bind_files: Vec<String> = vec!["stdlib.slip".to_string()]; let mut next_is_load = false; + let mut no_stdlib = false; for arg in env::args() { if next_is_load { @@ -52,6 +53,7 @@ fn main() { match arg.as_str() { s if s.ends_with("myslip") => continue, "-l" | "--load" => next_is_load = true, + "--no-stdlib" => no_stdlib = true, s => match file_to_execute { Some(n) => { println!("Error: can't execute both '{}' and '{}', please specify just one file", s, n); @@ -68,6 +70,9 @@ fn main() { ); return; } + if no_stdlib { + bind_files.remove(0); + } let binds = match read_bind_files(bind_files) { Ok(x) => x, |