-
Notifications
You must be signed in to change notification settings - Fork 241
Export APIs and add documentation #421
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
base: main
Are you sure you want to change the base?
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.
Pull request overview
This pull request exports internal APIs to make them publicly accessible and adds comprehensive documentation across multiple modules. The changes focus on making the codebase more usable as a library by exposing key types and functions while improving code documentation.
- Exports internal modules (
spartan,r1cs,gadgets,constants,digest) to public visibility - Adds detailed documentation comments for public APIs, including function descriptions, parameters, and return values
- Fixes spelling errors in comments (e.g., "constrain" → "constrains")
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/spartan/sumcheck.rs | Exports SumcheckProof struct and adds documentation for verification and proving methods |
| src/spartan/polys/power.rs | Exports PowPolynomial and adds documentation; adds coordinates() accessor method |
| src/spartan/polys/multilinear.rs | Exports SparsePolynomial struct and makes evaluation vectors public |
| src/spartan/polys/mod.rs | Changes module visibility from pub(crate) to pub for eq, multilinear, and power modules |
| src/spartan/polys/eq.rs | Makes the internal r field public with documentation |
| src/spartan/mod.rs | Exports submodules and adds documentation; exports powers() utility and adds accessors to PolyEvalWitness/PolyEvalInstance |
| src/spartan/math.rs | Adds module-level documentation and documents the Math trait |
| src/r1cs/mod.rs | Adds accessor methods for R1CSShape, R1CSWitness, R1CSInstance, RelaxedR1CSWitness, and RelaxedR1CSInstance with documentation |
| src/lib.rs | Moves constants, digest, and r1cs modules from private to public |
| src/gadgets/nonnative/util.rs | Fixes spelling in comments and makes Num fields public with documentation |
| src/gadgets/nonnative/mod.rs | Adds module-level documentation |
| src/gadgets/nonnative/bignat.rs | Adds documentation for BigNatParams, BigNat, and Polynomial methods |
| src/gadgets/mod.rs | Changes gadget modules from pub(crate) to pub with descriptive documentation |
| src/gadgets/ecc.rs | Makes point coordinate fields public with documentation for AllocatedPoint, AllocatedPointNonInfinity, and AllocatedNonnativePoint |
| src/digest.rs | Adds comprehensive module-level documentation |
| src/constants.rs | Adds module-level and constant-level documentation; changes all constants from pub(crate) to pub |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This method allows external crates (like MicroNova) to extract the (x, y) coordinates of commitment key generator points. This is useful for in-circuit verification of polynomial evaluations. - Add ck_to_coordinates to CommitmentEngineTrait - Implement for PedersenCommitmentEngine (delegates to existing method) - Implement for HyperKZGCommitmentEngine (add to_coordinates method first)
No description provided.