1#![cfg_attr(not(feature = "std"), no_std)]
17
18#[cfg(all(test, not(feature = "std")))]
19#[macro_use]
20extern crate std;
21
22#[cfg(not(feature = "std"))]
23pub use alloc::*;
24
25#[cfg(not(feature = "std"))]
26pub use core::*;
27
28#[cfg(feature = "std")]
29#[doc(hidden)]
30pub use std::*;
31
32#[cfg(not(feature = "std"))]
33#[allow(unused_imports)]
34#[doc(hidden)]
35pub use alloc::{boxed::Box, vec::Vec};
36
37#[cfg(feature = "std")]
38#[allow(unused_imports)]
39#[doc(hidden)]
40pub use std::{boxed::Box, vec::Vec};
41
42#[macro_use]
43extern crate thiserror;
44
45pub mod biginteger;
46pub use biginteger::*;
47
48pub mod bititerator;
49pub use bititerator::*;
50
51#[macro_use]
52pub mod bits;
53pub use bits::*;
54
55#[macro_use]
56pub mod bytes;
57pub use bytes::*;
58
59pub mod error;
60pub use error::*;
61
62pub mod iterator;
63pub use iterator::*;
64
65#[macro_use]
66pub mod parallel;
67pub use parallel::*;
68
69pub mod rand;
70pub use self::rand::*;
71
72pub mod serialize;
73pub use serialize::*;
74
75#[cfg(not(feature = "std"))]
76pub mod io;
77
78#[cfg(not(feature = "std"))]
79pub fn error(_msg: &'static str) -> io::Error {
80 io::Error
81}
82
83#[cfg(feature = "std")]
84pub fn error<S: ToString>(msg: S) -> io::Error {
85 io::Error::new(io::ErrorKind::Other, msg.to_string())
86}