Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature gate local & public #29

Closed
not-my-profile opened this issue Oct 21, 2021 · 2 comments · Fixed by #44
Closed

Feature gate local & public #29

not-my-profile opened this issue Oct 21, 2021 · 2 comments · Fixed by #44

Comments

@not-my-profile
Copy link
Contributor

not-my-profile commented Oct 21, 2021

Some applications might only need Paseto local, while some applicaitons might only need Paseto public. In either case they might want to avoid an unnecessary dependency on ed25519-dalek or orion respectively.

So I think the following would make sense:

[features]
default = [ "std", "local", "public" ]
std = [ "serde_json", "chrono" ]
local = [ "orion" ]
public = [ "ed25519-dalek" ]

The current dependency on orion::util::secure_cmp would need to be dropped (we can just directly depend on subtle).

To make docs.rs render feature badges we can employ this trick.

@brycx
Copy link
Owner

brycx commented Oct 21, 2021

This seems reasonable, we can add this.

@brycx
Copy link
Owner

brycx commented Apr 26, 2022

I'm going to close this issue for now. The upcoming 0.5.0 release has all versions feature-gated and now that v3 is also being included, I feel like further splitting into public/local features will simply clutter the features-list too much. Let me know if this is critical for you @not-my-profile.

The features badge trick you proposed, is also included in the next release.

@brycx brycx closed this as completed Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants