From 4fe99b21c986eeee913e52ba1a01325d1e26ecec Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Sat, 6 Jul 2019 11:25:01 +0200 Subject: [PATCH 1/2] feat: add better feature configurations --- Cargo.toml | 3 ++- README.md | 6 ++++++ deltachat-ffi/Cargo.toml | 5 ++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ef6323620..8e37e0aaa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"] diff --git a/README.md b/README.md index db684fe51..892fdf2bb 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/deltachat-ffi/Cargo.toml b/deltachat-ffi/Cargo.toml index 5df91a47b..7d619481e 100644 --- a/deltachat-ffi/Cargo.toml +++ b/deltachat-ffi/Cargo.toml @@ -20,4 +20,7 @@ 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"] From 286d1a99aaa9b662a88d4b9f1d8dcc69ec4693e7 Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Sat, 6 Jul 2019 11:29:13 +0200 Subject: [PATCH 2/2] fixup --- Cargo.toml | 2 +- deltachat-ffi/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8e37e0aaa..cf561a36d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/deltachat-ffi/Cargo.toml b/deltachat-ffi/Cargo.toml index 7d619481e..596a6a84e 100644 --- a/deltachat-ffi/Cargo.toml +++ b/deltachat-ffi/Cargo.toml @@ -15,7 +15,7 @@ name = "deltachat" crate-type = ["cdylib", "staticlib"] [dependencies] -deltachat = { path = "../" } +deltachat = { path = "../", default-features = false } libc = "0.2" human-panic = "1.0.1"