hwchen / keyring-rs

Cross-platform library and utility to manage passwords
Apache License 2.0
450 stars 49 forks source link

Rework default feature set. #154

Closed brotskydotcom closed 6 months ago

brotskydotcom commented 6 months ago

This fixes #153 by making all platform dependencies be features and including them as default features, so now you can suppress building all platform dependencies by suppressing default features.

This also fixes #148 by having the code check to see if there is platform support and, if not, using the mock keystore as the default.

While this change is not fully backward compatible for people who were suppressing default features on macOS, iOS, Win, or FreeBSD, doing so was undefined behavior on those platforms and so changing it does not break the semantics of the API.