Skip to content
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

Bug ? circuit_builder timing | features misconfiguration #1639

Closed
NikitaMasych opened this issue Nov 27, 2024 · 0 comments · Fixed by #1640
Closed

Bug ? circuit_builder timing | features misconfiguration #1639

NikitaMasych opened this issue Nov 27, 2024 · 0 comments · Fixed by #1640

Comments

@NikitaMasych
Copy link
Contributor

Hey guys!

In plonky2/src/plonk/circuit_builder.rs there is enabled import then feature timing is activated:

#[cfg(feature = "timing")]
use web_time::Instant;

after that, there is something following:

#[cfg(feature = "std")]
let start = Instant::now();

This breaks compilation, if try to add plonky2 with only std feature:

[dependencies]
plonky2 = { version = "1.0.0", default-features = false, features = ["std"] }

since rust can't find Instant type (being unimported because I didn't enable timing)

I guess at the second code snippet shall be conditional for timing and not std, like:

#[cfg(feature = "timing")]
let start = Instant::now();

or maybe conditional import from std, if timing is disabled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant