Add comment regarding use of bat as a library, closes #953
commitb0e5828d3f6d9daa667055afd12801a182fe4a95
authorsharkdp <davidpeter@web.de>
dateSun 10 Jan 2021, 21:18 (6 years ago)
parentb7d499d
Cargo.toml+2
@@ -30,6 +30,8 @@ application = [
3030]
3131git = ["git2"] # Support indicating git modifications
3232paging = ["shell-words"] # Support applying a pager on the output
33+
34+# You need to use one of these if you depend on bat as a library:
3335regex-onig = ["syntect/regex-onig"] # Use the "oniguruma" regex engine
3436regex-fancy = ["syntect/regex-fancy"] # Use the rust-only "fancy-regex" engine
3537
README.md+5
@@ -692,6 +692,11 @@ bash assets/create.sh
692692cargo install --path . --locked --force
693693```
694694
695+If you want to build an application that uses `bat`s pretty-printing
696+features as a library, check out the [the API documentation](https://docs.rs/bat/).
697+Note that you have to use either `regex-onig` or `regex-fancy` as a feature
698+when you depend on `bat` as a library.
699+
695700## Contributing
696701
697702Take a look at the [`CONTRIBUTING.md`](CONTRIBUTING.md) guide.