snow
snow copied to clipboard
Support ring-accelerated without std
This PR makes some small changes to support two things:
- Using
ring-acceleratedwithout unconditionally enablingstd(this supports downstream users who want to usesnowand ring together in ano_stdcrate. - Skipping unneeded RustCrypto crate compilation when using
ring-acceleratedby enabling only the exact crypto dependencies that are required to still support all patterns ring alone can't support.
I tested this locally with: cargo test --no-default-features --features ring-accelerated and cargo test --features ring-accelerated.
As far as I know this doesn't cause a breaking change, but it does commit to allowing users to specify snow like this in their Cargo.toml instead of needing to enable the default resolver crypto on their own:
snow = { version = "0.10", default-features = false, features = ["default-resolver", "ring-accelerated"]
Let me know if you'd rather I drop the 2nd commit changing how the crypto features are enabled and replace it with extra documentation instead. I'm slightly on the fence about it but IMO it is better then a x25519 runtime error when someone uses default-features = false.