Merge pull request #175 from deltachat/fix-ringbuf

feat: add better feature configurations
This commit is contained in:
holger krekel
2019-07-06 12:03:53 +02:00
committed by GitHub
3 changed files with 14 additions and 4 deletions

View File

@@ -11,7 +11,7 @@ pkg-config = "0.3"
[dependencies]
libc = "0.2.51"
pgp = "0.2"
pgp = { version = "0.2", default-features = true }
hex = "0.3.2"
sha2 = "0.8.0"
rand = "0.6.5"
@@ -57,6 +57,7 @@ path = "examples/repl/main.rs"
[features]
default = ["nightly"]
default = ["nightly", "ringbuf"]
vendored = ["native-tls/vendored", "reqwest/default-tls-vendored"]
nightly = ["pgp/nightly"]
ringbuf = ["pgp/ringbuf"]

View File

@@ -84,6 +84,12 @@ $ cargo test --all
$ cargo build -p deltachat_ffi --release
```
## Features
- `vendored`: When using Openssl for TLS, this bundles a vendored version.
- `nightly`: Enable nightly only performance and security related features.
- `ringbuf`: Enable the use of [`slice_deque`](https://github.com/gnzlbg/slice_deque) in pgp.
[circle-shield]: https://img.shields.io/circleci/project/github/deltachat/deltachat-core-rust/master.svg?style=flat-square
[circle]: https://circleci.com/gh/deltachat/deltachat-core-rust/
[appveyor-shield]: https://ci.appveyor.com/api/projects/status/lqpegel3ld4ipxj8/branch/master?style=flat-square

View File

@@ -15,9 +15,12 @@ name = "deltachat"
crate-type = ["cdylib", "staticlib"]
[dependencies]
deltachat = { path = "../" }
deltachat = { path = "../", default-features = false }
libc = "0.2"
human-panic = "1.0.1"
[features]
default = ["deltachat/vendored"]
default = ["vendored", "nightly", "ringbuf"]
vendored = ["deltachat/vendored"]
nightly = ["deltachat/nightly"]
ringbuf = ["deltachat/ringbuf"]