num
OpenZKP
num | OpenZKP | |
---|---|---|
3 | 2 | |
990 | 622 | |
2.3% | 1.0% | |
4.6 | 0.0 | |
8 days ago | about 1 year ago | |
Rust | Rust | |
Apache License 2.0 | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
num
-
I've been learning Rust for 3 days and this is my first impression
Use num: https://github.com/rust-num/num
- BigInts in std?
-
A single issue with Rust that kills me every time with mathematics (rust repo issue 20671)
The num crate is worth a look - they do implement some of these things via macros. https://github.com/rust-num/num
OpenZKP
-
Donald Knuth’s Algorithm D, its implementation in Hacker’s Delight and elsewhere
Here is my optimized in-place Rust implementation [1].
It is a very tricky algorithm to get right. There are many edge cases that only happen for ~2^-64 fractions of the input space, so hard to find even with fuzz-testing. Best strategy is to implement it for small limbs first, and fuzz that well.
[1] https://github.com/0xProject/OpenZKP/blob/master/algebra/u25...
-
A single issue with Rust that kills me every time with mathematics (rust repo issue 20671)
I've also hit this issue while writing code generic over prime fields by-reference. I ended up defining traits FieldLike and RefFieldLike and anotating all functions as
What are some alternatives?
derive_more - Some more derive(Trait) options
libtorsion - C crypto library
num-bigint - Big integer types for Rust
num-primes - A Rust Library For Generating Large Composite, Prime, and Safe Prime Numbers
nim-stint - Stack-based arbitrary-precision integers - Fast and portable with natural syntax for resource-restricted devices.
style - css for rust
pipe-trait - Make it possible to chain regular functions
proc-macro-workshop - Learn to write Rust procedural macros [Rust Latam conference, Montevideo Uruguay, March 2019]
rfcs - RFCs for changes to Rust