Commit Graph

6 Commits

Author SHA1 Message Date
Shunsuke Mie
13d046e6ad Move definitions runner related functions
fn runner() and fn from_cli(cli: Cli) util functions are located to
app.rs. However, those are utils for runner. So this commit change the
functions to runner.rs.
2021-10-17 21:11:52 +05:30
Arijit Basu
3f668c2d04 Improve runner API
Some API improvements on top of #324
2021-09-17 09:33:55 +05:30
Tom van Dijk
671d1b11fd Refactored parts of runner::Runner to take a Cli struct, instead of putting everything manually in Runner. 2021-09-17 09:01:39 +05:30
Arijit Basu
2962a8d52d Further improve the API.
This improves the compatibility and adds the ability to introduce
non-breaking changes by using a builder pattern.

Example:

```rust
fn main() {
    match xplr::runner(None).and_then(|a| a.run()) {
        Ok(Some(out)) => print!("{}", out),
        Ok(None) => {}
        Err(err) => {
            if !err.to_string().is_empty() {
                eprintln!("error: {}", err);
            };

            std::process::exit(1);
        }
    }
}
```
2021-06-06 10:59:48 +05:30
Arijit Basu
fabcc8e865 Implement CLI arguments
Going with custom CLI parsing for minimalism and flexibility.

Closes: https://github.com/sayanarijit/xplr/issues/228
2021-06-05 13:11:54 +05:30
Arijit Basu
72a86f8e0e Polish xplr library API
Minor improvements to the xplr library API.

Closes: https://github.com/sayanarijit/xplr/issues/213
2021-06-04 17:38:49 +05:30