snarkvm_utilities/lib.rs
1// Copyright (c) 2019-2025 Provable Inc.
2// This file is part of the snarkVM library.
3
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at:
7
8// http://www.apache.org/licenses/LICENSE-2.0
9
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16#[macro_use]
17extern crate thiserror;
18
19pub mod biginteger;
20pub use biginteger::*;
21
22pub mod bititerator;
23pub use bititerator::*;
24
25#[macro_use]
26pub mod bits;
27pub use bits::*;
28
29#[macro_use]
30pub mod bytes;
31pub use bytes::*;
32
33#[macro_use]
34pub mod defer;
35pub use defer::*;
36
37pub mod error;
38pub use error::*;
39
40pub mod iterator;
41pub use iterator::*;
42
43#[macro_use]
44pub mod parallel;
45pub use parallel::*;
46
47#[macro_use]
48mod print;
49
50pub mod rand;
51pub use self::rand::*;
52
53pub mod serialize;
54pub use serialize::*;
55
56pub fn error<S: ToString>(msg: S) -> std::io::Error {
57 std::io::Error::other(msg.to_string())
58}