Don't bundle sqlite by default (#474)

* Don't bundle sqlite by default

* Split feature into `sqlite` & `sqlite-dynlib`

Also add feature documentation

* Copy feature doc to `lib.rs`

Co-authored-by: sholderbach <sholderbach@users.noreply.github.com>
This commit is contained in:
Jan Christian Grünhage 2022-09-18 14:17:34 +02:00 committed by GitHub
parent db646e9ff5
commit 7d721a10e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 2 deletions

View File

@ -28,7 +28,7 @@ strip-ansi-escapes = "0.1.1"
strum = "0.24"
strum_macros = "0.24"
fd-lock = "3.0.3"
rusqlite = { version = "0.28.0", optional = true, features = ["bundled"] }
rusqlite = { version = "0.28.0", optional = true }
serde_json = { version = "1.0.79", optional = true }
gethostname = { version = "0.2.3", optional = true }
thiserror = "1.0.31"
@ -42,5 +42,7 @@ rstest = { version = "0.15.0", default-features = false }
[features]
system_clipboard = ["clipboard"]
bashisms = []
sqlite = ["rusqlite", "serde_json", "gethostname"]
external_printer = ["crossbeam"]
sqlite = ["rusqlite/bundled", "serde_json", "gethostname"]
sqlite-dynlib = ["rusqlite", "serde_json", "gethostname"]

View File

@ -22,6 +22,7 @@ It is currently primarily developed as the interactive editor for [nushell](http
- [Integrate with `Hinter` for fish-style history autosuggestions](#integrate-with-hinter-for-fish-style-history-autosuggestions)
- [Integrate with custom line completion `Validator`](#integrate-with-custom-line-completion-validator)
- [Use custom `EditMode`](#use-custom-editmode)
- [Crate features](#crate-features)
- [Are we prompt yet? (Development status)](#are-we-prompt-yet-development-status)
- [Contributing](./CONTRIBUTING.md)
- [Alternatives](#alternatives)
@ -182,6 +183,14 @@ let mut line_editor = Reedline::create().with_edit_mode(Box::new(Vi::new(
)));
```
## Crate features
- `clipboard`: Enable support to use the `SystemClipboard`. Enabling this feature will return a `SystemClipboard` instead of a local clipboard when calling `get_default_clipboard()`.
- `bashisms`: Enable support for special text sequences that recall components from the history. e.g. `!!` and `!$`. For use in shells like `bash` or [`nushell`](https://nushell.sh).
- `sqlite`: Provides the `SqliteBackedHistory` to store richer information in the history. Statically links the required sqlite version.
- `sqlite-dynlib`: Alternative to the feature `sqlite`. Will not statically link. Requires `sqlite >= 3.38` to link dynamically!
- `external_printer`: **Experimental:** Thread-safe `ExternalPrinter` handle to print lines from concurrently running threads.
## Are we prompt yet? (Development status)
Reedline has now all the basic features to become the primary line editor for [nushell](https://github.com/nushell/nushell

View File

@ -161,6 +161,14 @@
//! )));
//! ```
//!
//! ## Crate features
//!
//! - `clipboard`: Enable support to use the `SystemClipboard`. Enabling this feature will return a `SystemClipboard` instead of a local clipboard when calling `get_default_clipboard()`.
//! - `bashisms`: Enable support for special text sequences that recall components from the history. e.g. `!!` and `!$`. For use in shells like `bash` or [`nushell`](https://nushell.sh).
//! - `sqlite`: Provides the `SqliteBackedHistory` to store richer information in the history. Statically links the required sqlite version.
//! - `sqlite-dynlib`: Alternative to the feature `sqlite`. Will not statically link. Requires `sqlite >= 3.38` to link dynamically!
//! - `external_printer`: **Experimental:** Thread-safe `ExternalPrinter` handle to print lines from concurrently running threads.
//!
//! ## Are we prompt yet? (Development status)
//!
//! Nushell has now all the basic features to become the primary line editor for [nushell](https://github.com/nushell/nushell