snow icon indicating copy to clipboard operation
snow copied to clipboard

Support ring-accelerated without std

Open complexspaces opened this issue 7 months ago • 0 comments

This PR makes some small changes to support two things:

  • Using ring-accelerated without unconditionally enabling std (this supports downstream users who want to use snow and ring together in a no_std crate.
  • Skipping unneeded RustCrypto crate compilation when using ring-accelerated by 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.

complexspaces avatar Jul 21 '25 19:07 complexspaces