Make workspace dependencies no-std compatible#3547
Draft
richardpringle wants to merge 3 commits intomasterfrom
Draft
Make workspace dependencies no-std compatible#3547richardpringle wants to merge 3 commits intomasterfrom
richardpringle wants to merge 3 commits intomasterfrom
Conversation
dff6fb5 to
79bec79
Compare
9365e4a to
6bafe08
Compare
79bec79 to
3421ef9
Compare
Set default-features = false for external dependencies (ark-ec, ark-ff, ark-poly, ark-serialize, ark-std, bcs, hex, itertools, num-bigint, num-integer, rand, serde, serde_with, sha2) and internal crates (o1-utils, poly-commitment, groupmap, mina-curves, mina-poseidon) at workspace level. Each consumer crate now explicitly opts into the features it needs. Crates on the no-std path (kimchi, poly-commitment, groupmap, curves, poseidon) propagate parallel/std features through their own feature flags. Always-std crates add features directly on their dep lines. Key changes: - poly-commitment/ipa.rs: cfg-gate prover-only SRS methods behind "std", add no-std lagrange_bases cache via Rc<RefCell<HashMap>> - kimchi/constraints.rs: cfg-gate LazyCache with preinit fallback for no-std - kimchi: re-export collections from poly-commitment instead of hashbrown - poseidon: add parallel feature, make rayon optional - groupmap/curves: add parallel feature flags - lookup/index.rs: replace itertools duplicates() with BTreeSet for no-std - Add kimchi/no-std-check/ standalone verification crate - Patch bcs to o1-labs fork for no-std support
3421ef9 to
bd56b29
Compare
richardpringle
commented
Mar 26, 2026
| // lives as long as the SRS. The reference is valid as long as the entry exists. | ||
| let map = self.borrow(); | ||
| let ptr = map.get(&key).unwrap() as *const Vec<PolyComm<G>>; | ||
| unsafe { &*ptr } |
Collaborator
Author
There was a problem hiding this comment.
This is really ugly, but this is what's happening in the old code...
Collaborator
Author
There was a problem hiding this comment.
Actually, this is unsound. I'm going to try to fix the code I copied on master first
richardpringle
commented
Mar 26, 2026
|
|
||
| /// Turns a non-hiding polynomial commitment into a hiding polynomial | ||
| /// commitment. Transforms each given `<a, G>` into `(<a, G> + wH, w)` with | ||
| /// a random `w` per commitment. |
Collaborator
Author
There was a problem hiding this comment.
Not sure why claude deletes these
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Set default-features = false for external dependencies (ark-ec, ark-ff, ark-poly, ark-serialize, ark-std, bcs, hex, itertools, num-bigint, num-integer, rand, serde, serde_with, sha2) and internal crates (o1-utils, poly-commitment, groupmap, mina-curves, mina-poseidon) at workspace level.
Each consumer crate now explicitly opts into the features it needs. Crates on the no-std path (kimchi, poly-commitment, groupmap, curves, poseidon) propagate parallel/std features through their own feature flags. Always-std crates add features directly on their dep lines.
Key changes: