mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-04 00:54:36 +00:00
Roc linker library base setup
This commit is contained in:
parent
d5058041b0
commit
c6217ebfdb
10 changed files with 151 additions and 0 deletions
17
linker/src/main.rs
Normal file
17
linker/src/main.rs
Normal file
|
@ -0,0 +1,17 @@
|
|||
use roc_linker::{build_app, preprocess, CMD_PREPROCESS, CMD_SURGERY};
|
||||
use std::io;
|
||||
|
||||
fn main() -> io::Result<()> {
|
||||
let matches = build_app().get_matches();
|
||||
|
||||
let exit_code = match matches.subcommand_name() {
|
||||
None => Ok::<i32, io::Error>(-1),
|
||||
Some(CMD_PREPROCESS) => {
|
||||
preprocess()?;
|
||||
Ok(0)
|
||||
}
|
||||
Some(CMD_SURGERY) => Ok(0),
|
||||
_ => unreachable!(),
|
||||
}?;
|
||||
std::process::exit(exit_code);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue