diff options
author | Igor Matuszewski <igor@sequoia-pgp.org> | 2020-10-23 12:25:39 +0200 |
---|---|---|
committer | Igor Matuszewski <igor@sequoia-pgp.org> | 2020-10-26 21:04:20 +0100 |
commit | f3563ab27f25ac82b341652da1087ff960afc307 (patch) | |
tree | f88eeb3fe3407aa4f1d540337f6fe034823592b1 /README.md | |
parent | cca20109efd1c1922f20bbf34a876850eaf4f2a1 (diff) |
Add an example on how to surface Sequoia backends for consumers
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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. |