-
Notifications
You must be signed in to change notification settings - Fork 88
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
Make static-context and lazy-static-context addictive #82
Conversation
I hate to be this guy but we need a |
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.
Definitely would be good to document the features offered in the readme.
/// A static ECMult context. | ||
// Correct `pre_g` values are fed into `ECMultContext::new_from_raw`, generated by build script. |
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.
/// A static ECMult context. | |
// Correct `pre_g` values are fed into `ECMultContext::new_from_raw`, generated by build script. | |
/// A static ECMult context. Requires that the `static-context` to be enabled and that `lazy-static-context` is **not** enabled. | |
/// Correct `pre_g` values are fed into `ECMultContext::new_from_raw`, generated by build script. |
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.
ECMULT_CONTEXT
is defined either here or through lazy_static
. It is always available either with static-context
or lazy-static-context
.
The second line is related to implementation details of how this is generated, so it doesn't really fit the docs.
/// A static ECMult context. | ||
// Correct `pre_g` values are fed into `ECMultContext::new_from_raw`, generated by build script. | ||
pub static ECMULT_CONTEXT: ECMultContext = | ||
unsafe { ECMultContext::new_from_raw(include!(concat!(env!("OUT_DIR"), "/const.rs"))) }; | ||
|
||
#[cfg(feature = "static-context")] | ||
#[cfg(all(feature = "static-context", not(feature = "lazy-static-context")))] | ||
/// A static ECMultGen context. |
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.
Same note in the docs here.
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.
Same as above.
* Make static-context and lazy-static-context addictive * Fix README docs regarding `lazy-static-context` overwrites `static-context`
closes #77