-
Notifications
You must be signed in to change notification settings - Fork 138
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
feat: serde trait for field and group elements #30
feat: serde trait for field and group elements #30
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! But I remember the reason to manually implement SerdeObject
is to avoid dependency serde
, so I think it'd be nice to have flag to enable/disable this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, put this behind a serde
feature. The derives and the imports as well as the serde dependency.
Users that don't need it should not pay for it in compilation time.
Cargo.toml
Outdated
@@ -34,6 +35,7 @@ lazy_static = "1.4.0" | |||
num-bigint = "0.4.3" | |||
num-traits = "0.2" | |||
paste = "1.0.11" | |||
serde = { version = "1.0", default-features = false, features = ["derive"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd create a serde feature and import this under it.
cool. added in 5b97d11 |
94dcabd
to
c897666
Compare
Don't know why CI failed...
passed on my local machine |
No worries. It happens sometimes. Not sure what's the exact issue with the gh-runner TBH. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for adding the feature!!
Hi @zhenfeizhang is there any specific reason not re-export If no specific concern I'd suggest to make re-export it by default, what do you think? |
Happy to do so. Want to double check @CPerezz before preceeding
Is |
serde
is quite useful for downstream libraries. would love to have this feature enabledthe user can enable it with
feature = derive_serde