diff --git a/Makefile b/Makefile index 055bd6a0d..88131e671 100644 --- a/Makefile +++ b/Makefile @@ -462,6 +462,8 @@ clippy_tfhe_csprng: install_rs_check_toolchain clippy_zk_pok: install_rs_check_toolchain RUSTFLAGS="$(RUSTFLAGS)" cargo "$(CARGO_RS_CHECK_TOOLCHAIN)" clippy --all-targets \ -p tfhe-zk-pok -- --no-deps -D warnings + RUSTFLAGS="$(RUSTFLAGS)" cargo "$(CARGO_RS_CHECK_TOOLCHAIN)" clippy --all-targets \ + -p tfhe-zk-pok --features=experimental -- --no-deps -D warnings .PHONY: clippy_versionable # Run clippy lints on tfhe-versionable clippy_versionable: install_rs_check_toolchain @@ -993,7 +995,7 @@ test_tfhe_csprng_big_endian: install_rs_build_toolchain install_cargo_cross .PHONY: test_zk_pok # Run tfhe-zk-pok tests test_zk_pok: install_rs_build_toolchain RUSTFLAGS="$(RUSTFLAGS)" cargo $(CARGO_RS_BUILD_TOOLCHAIN) test --profile $(CARGO_PROFILE) \ - -p tfhe-zk-pok + -p tfhe-zk-pok --features experimental .PHONY: test_zk_wasm_x86_compat_ci test_zk_wasm_x86_compat_ci: check_nvm_installed diff --git a/tfhe-zk-pok/Cargo.toml b/tfhe-zk-pok/Cargo.toml index ae5c802f1..a6470a559 100644 --- a/tfhe-zk-pok/Cargo.toml +++ b/tfhe-zk-pok/Cargo.toml @@ -25,6 +25,9 @@ zeroize = "1.7.0" num-bigint = "0.4.5" tfhe-versionable = { version = "0.6.0", path = "../utils/tfhe-versionable" } +[features] +experimental = [] + [dev-dependencies] serde_json = "~1.0" itertools = { workspace = true } diff --git a/tfhe-zk-pok/src/proofs/mod.rs b/tfhe-zk-pok/src/proofs/mod.rs index c1fe01e60..1bd9b448d 100644 --- a/tfhe-zk-pok/src/proofs/mod.rs +++ b/tfhe-zk-pok/src/proofs/mod.rs @@ -42,6 +42,7 @@ impl OneBased { Self(inner) } + #[cfg(feature = "experimental")] pub fn new_ref(inner: &T) -> &Self { unsafe { &*(inner as *const T as *const Self) } } @@ -375,12 +376,17 @@ where } } +#[cfg(feature = "experimental")] pub mod binary; +#[cfg(feature = "experimental")] pub mod index; +#[cfg(feature = "experimental")] +pub mod range; +#[cfg(feature = "experimental")] +pub mod rlwe; + pub mod pke; pub mod pke_v2; -pub mod range; -pub mod rlwe; #[cfg(test)] mod test {