1#![doc(test(attr(warn(unused))))]
8#![doc(test(attr(allow(unused_variables))))]
9#![doc(test(attr(allow(unused_imports))))]
10#![warn(clippy::pedantic)]
15#![warn(clippy::nursery)]
17#![warn(rustdoc::broken_intra_doc_links)]
18#![allow(clippy::unreadable_literal)] #![allow(clippy::doc_markdown)] #![allow(clippy::missing_panics_doc)] #![allow(clippy::cast_possible_truncation)] #![allow(clippy::similar_names)] #![allow(clippy::must_use_candidate)] #![allow(clippy::wildcard_imports)] #![allow(clippy::module_name_repetitions)] #![allow(clippy::cast_lossless)] #![allow(clippy::missing_const_for_fn)] #![allow(clippy::missing_errors_doc)] #![allow(clippy::cast_precision_loss)] #![allow(clippy::items_after_statements)] #![allow(clippy::cast_sign_loss)] #![allow(clippy::inline_always)] #![allow(clippy::many_single_char_names)] #![allow(clippy::too_many_lines)] #![allow(clippy::match_same_arms)] #![allow(clippy::range_plus_one)] #![allow(clippy::return_self_not_must_use)] #![allow(clippy::ignored_unit_patterns)] #![allow(clippy::large_types_passed_by_value)] #![allow(clippy::float_cmp)] #![allow(clippy::bool_to_int_with_if)] #![allow(clippy::unsafe_derive_deserialize)] #![allow(clippy::cast_possible_wrap)] #![allow(clippy::too_long_first_doc_paragraph)]
47#![allow(clippy::redundant_closure_for_method_calls)]
48#![allow(clippy::semicolon_if_nothing_returned)]
54#![allow(clippy::explicit_iter_loop)]
57#![allow(clippy::struct_field_names)]
60#![allow(clippy::missing_const_for_fn)] #![allow(clippy::redundant_pub_crate)] #![allow(clippy::suboptimal_flops)] #![allow(clippy::significant_drop_tightening)] #![allow(clippy::cognitive_complexity)] #![allow(clippy::iter_with_drain)] #![allow(clippy::large_stack_frames)] #![cfg_attr(feature = "__wasm_api", allow(dead_code))]
72#![cfg_attr(
73 all(
74 any(target_arch = "x86", target_arch = "x86_64"),
75 feature = "nightly-avx512"
76 ),
77 feature(avx512_target_feature, stdarch_x86_avx512)
78)]
79#![cfg_attr(all(doc, not(doctest)), feature(doc_auto_cfg))]
80#![cfg_attr(all(doc, not(doctest)), feature(doc_cfg))]
81#![cfg_attr(test, allow(clippy::large_stack_arrays))]
83
84#[cfg(feature = "__c_api")]
85pub mod c_api;
86
87#[cfg(feature = "boolean")]
88pub mod boolean;
93
94pub mod core_crypto;
99
100#[cfg(feature = "integer")]
101pub mod integer;
106
107#[cfg(feature = "shortint")]
108pub mod shortint;
113
114#[cfg(feature = "pbs-stats")]
115pub use shortint::server_key::pbs_stats::*;
116
117#[cfg(feature = "__wasm_api")]
118mod js_on_wasm_api;
120
121#[cfg(all(
122 doctest,
123 feature = "shortint",
124 feature = "boolean",
125 feature = "integer",
126 feature = "zk-pok",
127 feature = "strings"
128))]
129mod test_user_docs;
130
131#[cfg(feature = "strings")]
132pub mod strings;
133
134#[cfg(feature = "integer")]
135pub(crate) mod high_level_api;
137
138#[cfg(feature = "integer")]
139pub use high_level_api::*;
140
141#[cfg(any(test, doctest, feature = "internal-keycache"))]
142pub mod keycache;
144
145pub mod safe_serialization;
146
147pub mod conformance;
148
149pub mod named;
150
151pub mod error;
152#[cfg(feature = "zk-pok")]
153pub mod zk;
154
155#[cfg(any(feature = "integer", feature = "shortint"))]
156pub(crate) use error::error;
157pub use error::{Error, ErrorKind};
158pub type Result<T> = std::result::Result<T, Error>;
159
160pub use tfhe_versionable::{Unversionize, Versionize};
161
162#[cfg(feature = "hpu")]
164pub use tfhe_hpu_backend;