Commit Graph

6 Commits (main)

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.
3 years ago
Arijit Basu 3f668c2d04 Improve runner API
Some API improvements on top of #324
3 years ago
Tom van Dijk 671d1b11fd Refactored parts of `runner::Runner` to take a Cli struct, instead of putting everything manually in `Runner`. 3 years ago
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);
        }
    }
}
```
3 years ago
Arijit Basu fabcc8e865 Implement CLI arguments
Going with custom CLI parsing for minimalism and flexibility.

Closes: https://github.com/sayanarijit/xplr/issues/228
3 years ago
Arijit Basu 72a86f8e0e Polish xplr library API
Minor improvements to the xplr library API.

Closes: https://github.com/sayanarijit/xplr/issues/213
3 years ago