This commit is contained in:
MeiK 2020-03-27 19:07:01 +08:00
parent 74bbf6432d
commit ae37e776ab
2 changed files with 10 additions and 11 deletions

View File

@ -97,17 +97,7 @@ impl Config {
Ok(config)
}
pub fn default() -> Result<Config> {
let config_yaml = "
languages:
- language: c
version: 7.5.0
compile_command: /usr/bin/gcc {{filename}} -o a.out
run_command: ./a.out
- language: python
version: 3.6.9
compile_command: /usr/bin/python3 -m compileall {{filename}}
run_command: /use/bin/python3 {{filename}}
";
let config_yaml = include_str!("default.yml");
let config = Config::load_yaml(config_yaml)?;
Ok(config)
}

9
src/default.yml Normal file
View File

@ -0,0 +1,9 @@
languages:
- language: c
version: 7.5.0
compile_command: /usr/bin/gcc {{filename}} -o a.out
run_command: ./a.out
- language: python
version: 3.6.9
compile_command: /usr/bin/python3 -m compileall {{filename}}
run_command: /use/bin/python3 {{filename}}