summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorIgor Matuszewski <igor@sequoia-pgp.org>2020-10-23 12:25:39 +0200
committerIgor Matuszewski <igor@sequoia-pgp.org>2020-10-26 21:04:20 +0100
commitf3563ab27f25ac82b341652da1087ff960afc307 (patch)
treef88eeb3fe3407aa4f1d540337f6fe034823592b1 /README.md
parentcca20109efd1c1922f20bbf34a876850eaf4f2a1 (diff)
Add an example on how to surface Sequoia backends for consumers
Diffstat (limited to 'README.md')
-rw-r--r--README.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/README.md b/README.md
index ff5bbdef..783a3c4c 100644
--- a/README.md
+++ b/README.md
@@ -126,6 +126,19 @@ can opt into different backends. This is done by:
- providing top-level features for your crate that correspond to `crypto-*` ones in `sequoia-openpgp`
- (Optionally) Select one by default yourself
+Like so:
+```toml
+# Cargo.toml
+[dependencies]
+sequoia-openpgp = { version = "0.20", default-features = false }
+[features]
+# Pick a Sequoia backend enabled by default
+default = ["seqouia-openpgp/crypto-nettle"]
+# .. but allow others to select a different backend, as well
+crypto-cng = ["sequoia-openpgp/crypto-cng"]
+crypto-nettle = ["sequoia-openpgp/crypto-nettle"]
+```
+
Once Cargo target-specific default features are [implemented], it will be possible
to automatically select a backend depending on the operating system used.