-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add no-std
support
#11
Conversation
I am working on |
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.
utACK with cleanup suggestion.
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.
utACK
Co-authored-by: str4d <[email protected]>
cleaned up & rebased . but not ready to merge [SOLVED]
fn optional_multiscalar_mul<I, J>(scalars: I, points: J) -> Option<ExtendedPoint> where ... {
#[cfg(feature = "alloc")]
{...}
#[cfg(not(feature = "alloc"))]
scalars
.into_iter()
.map(|c| c.borrow().clone())
.zip(points.into_iter())
.try_fold(ExtendedPoint::identity(), |acc, (s, p)| Some(acc + p? * s))
} Is the aforementioned approach fine? Or do you see any better approach? |
I return to this PR. It's ready for a review and merge. @str4d @daira Issues from the previous comment:
|
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.
utACK
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.
Looks great, thanks! Just needs a small adjustment
Codecov Report
@@ Coverage Diff @@
## main #11 +/- ##
==========================================
- Coverage 86.75% 86.65% -0.11%
==========================================
Files 15 15
Lines 1148 1154 +6
==========================================
+ Hits 996 1000 +4
- Misses 152 154 +2 |
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've changed to 2021 edition to fix the resolver issue and solved conflicts.
Add support for no-std builds.
comments to this PR:
src/error.rs
where I had to avoid usage ofthiserror
(crate has not no-std support)std
alloc
because usage ofVec
inVartimeMultiscalarMul
implementationstests/bincode.rs
enabled only onstd
feature, because it depends onserde
serde
enabled ifstd
enabled, becauseserde
-conditioned compilation for modulemessages
is missing #9