Skip to content

Draft: PoC: sequoia-openpgp facade crate with OS-default crypto backend

Igor Matuszewski requested to merge igor/default-openpgp into master

Refs: #575 (closed)

Uses Cargo nightly new feature resolver: https://github.com/rust-lang/cargo/issues/1197#issuecomment-590385530

Unfortunately,

  • this does not enable us to use target-specific features for our own crate, requiring a facade crate
  • only allows to specify which features will be enabled for a target, preventing us from selecting a different backend if user wants to

To see the new feature resolver in action, run

$ cd openpgp-default
$ cargo +nightly build -Z features=itarget

This should build CNG on Windows and Nettle elsewhere.

I don't think this new feature resolver gives us much, honestly. I believe this split into core/facade will bring more confusion and maintenance burden than convenience, at least in the current state. But for what it's worth, this is one way to implement OS-specific default crypto backends and I'm opening to start a discussion/serve as a point of reference.

Merge request reports