Skip to content

Commit aecddb6

Browse files
authored
Merge pull request #2635 from kpandl/test-exports
Add test-exports feature for accessing snarkVM/algorithms TestCircuit in external projects
2 parents 8159e73 + caff7c6 commit aecddb6

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ parameters = [ "snarkvm-parameters" ]
150150
synthesizer = [ "snarkvm-synthesizer" ]
151151
utilities = [ "snarkvm-utilities" ]
152152
wasm = [ "snarkvm-wasm" ]
153+
test_exports = [ "snarkvm-algorithms/test_exports" ]
153154
test_targets = [ "snarkvm-console/test_targets" ]
154155

155156
[dependencies.snarkvm-algorithms]

algorithms/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,3 +212,4 @@ serial = [
212212
"snarkvm-utilities/serial"
213213
]
214214
snark = [ "crypto_hash", "fft", "msm", "polycommit", "r1cs" ]
215+
test_exports = []

algorithms/src/snark/varuna/data_structures/mod.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,17 @@ pub(super) mod proof;
3030
pub use proof::*;
3131

3232
/// A test circuit.
33-
#[cfg(any(test, feature = "test"))]
33+
#[cfg(any(test, feature = "test", feature = "test_exports"))]
3434
pub(super) mod test_circuit;
35-
#[cfg(any(test, feature = "test"))]
35+
#[cfg(any(test, feature = "test", feature = "test_exports"))]
3636
pub use test_circuit::*;
3737

38+
/// Test exports module that provides access to test utilities for external crates.
39+
#[cfg(feature = "test_exports")]
40+
pub mod test_exports {
41+
/// Test circuit for Varuna (for testing purposes only).
42+
pub use crate::snark::varuna::TestCircuit;
43+
}
44+
3845
/// The Varuna universal SRS.
3946
pub type UniversalSRS<E> = crate::polycommit::sonic_pc::UniversalParams<E>;

0 commit comments

Comments
 (0)