-
Notifications
You must be signed in to change notification settings - Fork 78
Re-organize top-level crate exports #736
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,36 +15,44 @@ pub mod rand; | |
| pub mod utils; | ||
| pub mod word; | ||
|
|
||
| // Test utilities for generating random data (used in tests and benchmarks) | ||
| #[cfg(any(test, feature = "std"))] | ||
| pub mod test_utils; | ||
|
|
||
| // RE-EXPORTS | ||
| // ================================================================================================ | ||
|
|
||
| pub use k256::elliptic_curve::zeroize; | ||
| pub use p3_air::{ | ||
| Air, AirBuilder, AirBuilderWithPublicValues, BaseAir, BaseAirWithPublicValues, | ||
| ExtensionBuilder, FilteredAirBuilder, PairBuilder, PairCol, PermutationAirBuilder, | ||
| VirtualPairCol, | ||
| }; | ||
| pub use p3_field::{ | ||
| BasedVectorSpace, ExtensionField, Field, PrimeCharacteristicRing, PrimeField64, | ||
| batch_multiplicative_inverse, extension::BinomialExtensionField, integers::QuotientMap, | ||
| }; | ||
| pub use p3_miden_air::{BaseAirWithAuxTrace, FilteredMidenAirBuilder, MidenAir, MidenAirBuilder}; | ||
| pub use p3_miden_goldilocks::{Goldilocks as Felt, Poseidon2Goldilocks}; | ||
| pub use p3_miden_prover::{ | ||
| Commitments, Domain, Entry, OpenedValues, PackedChallenge, PackedVal, PcsError, Proof, | ||
| ProverConstraintFolder, StarkConfig, StarkGenericConfig, SymbolicAirBuilder, | ||
| SymbolicExpression, SymbolicVariable, Val, VerificationError, VerifierConstraintFolder, | ||
| generate_logup_trace, get_log_quotient_degree, get_max_constraint_degree, | ||
| get_symbolic_constraints, prove, quotient_values, recompose_quotient_from_chunks, verify, | ||
| verify_constraints, | ||
| extension::BinomialExtensionField, integers::QuotientMap, | ||
| }; | ||
| pub use p3_miden_goldilocks::Goldilocks as Felt; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the longer run, I wonder if we should create a newtype for this - i.e.: pub struct Felt(p3_miden_goldilocks::Goldilocks);And implement a bunch of "pass-through" methods in it directly so that we don't have to import various traits when we need to get specific functionality. |
||
| pub use word::{Word, WordError}; | ||
|
|
||
| pub use crate::rand::{Randomizable, RpoRandomCoin, RpxRandomCoin}; | ||
| pub mod stark { | ||
| //! Foundational components for the STARK proving system based on Plonky3. | ||
| //! | ||
| //! This module contains components needed to build a STARK prover/verifier and define | ||
| //! Algebraic Intermediate Representation (AIR) for the Miden VM and other components. | ||
| //! It primarily consists of re-exports from the Plonky3 project with some Miden-specific | ||
| //! adaptations. | ||
| pub use p3_miden_prover::{ | ||
| Commitments, Domain, Entry, OpenedValues, PackedChallenge, PackedVal, PcsError, Proof, | ||
| ProverConstraintFolder, StarkConfig, StarkGenericConfig, SymbolicAirBuilder, | ||
| SymbolicExpression, SymbolicVariable, Val, VerificationError, VerifierConstraintFolder, | ||
| generate_logup_trace, get_log_quotient_degree, get_max_constraint_degree, | ||
| get_symbolic_constraints, prove, quotient_values, recompose_quotient_from_chunks, verify, | ||
| verify_constraints, | ||
| }; | ||
|
|
||
| pub mod air { | ||
| pub use p3_air::{ | ||
| Air, AirBuilder, AirBuilderWithPublicValues, BaseAir, BaseAirWithPublicValues, | ||
| ExtensionBuilder, FilteredAirBuilder, PairBuilder, PairCol, PermutationAirBuilder, | ||
| VirtualPairCol, | ||
| }; | ||
| pub use p3_miden_air::{ | ||
| BaseAirWithAuxTrace, FilteredMidenAirBuilder, MidenAir, MidenAirBuilder, | ||
| }; | ||
| } | ||
| } | ||
|
Comment on lines
+35
to
+61
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is my stab at how I think the module should be organized, but we can change this later in case another structure is more logical. Also, same as last comment: we should expand this in the future to provide a more comprehensive explanation of what this module is and how the provided functionality is different from stock Plonky3. This would include adding comments for the |
||
|
|
||
| // TYPE ALIASES | ||
| // ================================================================================================ | ||
|
|
||
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.
We should expand this quite a bit in the future. Let's add it to the list of follow-ups.
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.
A few possible additional re-exports were mentioned here:
#720 (comment)
But the re-exports we have as of 7ba721b are rather extensive.