Skip to content

Commit

Permalink
fix(zk): fix build with feature zk-pok without shortint
Browse files Browse the repository at this point in the history
  • Loading branch information
nsarlin-zama committed Nov 7, 2024
1 parent f9c4627 commit f8bde7f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@ clippy_core: install_rs_check_toolchain
RUSTFLAGS="$(RUSTFLAGS)" cargo "$(CARGO_RS_CHECK_TOOLCHAIN)" clippy \
--features=$(TARGET_ARCH_FEATURE),experimental,nightly-avx512 \
-p $(TFHE_SPEC) -- --no-deps -D warnings
RUSTFLAGS="$(RUSTFLAGS)" cargo "$(CARGO_RS_CHECK_TOOLCHAIN)" clippy \
--features=$(TARGET_ARCH_FEATURE),zk-pok \
-p $(TFHE_SPEC) -- --no-deps -D warnings

.PHONY: clippy_boolean # Run clippy lints enabling the boolean features
clippy_boolean: install_rs_check_toolchain
Expand All @@ -323,6 +326,9 @@ clippy_shortint: install_rs_check_toolchain
RUSTFLAGS="$(RUSTFLAGS)" cargo "$(CARGO_RS_CHECK_TOOLCHAIN)" clippy \
--features=$(TARGET_ARCH_FEATURE),shortint,experimental \
-p $(TFHE_SPEC) -- --no-deps -D warnings
RUSTFLAGS="$(RUSTFLAGS)" cargo "$(CARGO_RS_CHECK_TOOLCHAIN)" clippy \
--features=$(TARGET_ARCH_FEATURE),zk-pok,shortint \
-p $(TFHE_SPEC) -- --no-deps -D warnings

.PHONY: clippy_integer # Run clippy lints enabling the integer features
clippy_integer: install_rs_check_toolchain
Expand Down
2 changes: 2 additions & 0 deletions tfhe/src/zk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use crate::conformance::ParameterSetConformant;
use crate::core_crypto::commons::math::random::BoundedDistribution;
use crate::core_crypto::prelude::*;
use crate::named::Named;
#[cfg(feature = "shortint")]
use crate::shortint::parameters::CompactPublicKeyEncryptionParameters;
use rand_core::RngCore;
use std::cmp::Ordering;
Expand Down Expand Up @@ -44,6 +45,7 @@ pub struct CompactPkePublicParamsConformanceParams {
}

impl CompactPkePublicParamsConformanceParams {
#[cfg(feature = "shortint")]
pub fn new<E, P: TryInto<CompactPublicKeyEncryptionParameters, Error = E>>(
value: P,
max_num_message: usize,
Expand Down

0 comments on commit f8bde7f

Please sign in to comment.