feat(toolchain): support getrandom v0.2 and v0.3 simultaneously#1795
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR aims to support both getrandom v0.2 and v0.3 simultaneously so that libraries still using getrandom v0.2 (e.g., ecdsa) do not trigger an unsupported backend error.
- Updated test cases to pass a program name parameter for getrandom and getrandom_v02
- Added a new example program for getrandom_v02 and updated compile error directives
- Adjusted Cargo.toml and custom getrandom registrations to include getrandom-v02 support
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| extensions/rv32im/tests/src/lib.rs | Updated test cases to include getrandom_v02 as program input |
| extensions/rv32im/tests/programs/examples/getrandom_v02.rs | Added new example program for getrandom v0.2 |
| extensions/rv32im/tests/programs/examples/getrandom.rs | Added compile error directive for getrandom-v02 compatibility |
| extensions/rv32im/tests/programs/Cargo.toml | Included getrandom-v02 dependency and updated feature config |
| crates/toolchain/openvm/src/getrandom.rs | Added custom registration for getrandom_v02 |
| crates/toolchain/openvm/Cargo.toml | Updated dependencies and feature definitions for getrandom-v02 |
Comments suppressed due to low confidence (1)
extensions/rv32im/tests/src/lib.rs:281
- [nitpick] There is an inconsistency in naming between the program identifier 'getrandom_v02' (with an underscore) and the feature flag 'getrandom-v02' (with a hyphen). Consider aligning these naming conventions for clarity.
#[test_case("getrandom_v02", vec!["getrandom-v02", "getrandom-unsupported"])]
Commit: 0781ff5 |
HrikB
approved these changes
Jun 26, 2025
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.
With the v1.3.0-rc release, we moved to supporting
getrandom v0.3. However some libraries likeecdsastill usegetrandom v0.2and it would give the unsupported backend error.Turns out it is possible to support both simultaneously.
Closes INT-4187