Skip to main content

uts_core/
lib.rs

1//! # Universal Timestamps Core Library
2
3// MIT License
4//
5// Copyright (c) 2025 UTS Contributors
6//
7// Permission is hereby granted, free of charge, to any person obtaining a copy
8// of this software and associated documentation files (the "Software"), to deal
9// in the Software without restriction, including without limitation the rights
10// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11// copies of the Software, and to permit persons to whom the Software is
12// furnished to do so, subject to the following conditions:
13//
14// The above copyright notice and this permission notice shall be included in all
15// copies or substantial portions of the Software.
16//
17// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23// SOFTWARE.
24//
25// Apache License, Version 2.0
26//
27// Copyright (c) 2025 UTS Contributors
28//
29// Licensed under the Apache License, Version 2.0 (the "License");
30// you may not use this file except in compliance with the License.
31// You may obtain a copy of the License at
32//
33//     http://www.apache.org/licenses/LICENSE-2.0
34//
35// Unless required by applicable law or agreed to in writing, software
36// distributed under the License is distributed on an "AS IS" BASIS,
37// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
38// See the License for the specific language governing permissions and
39// limitations under the License.
40
41extern crate core;
42
43#[cfg(test)]
44pub mod fixtures;
45
46/// Encoding and decoding support for OpenTimestamps proofs.
47pub mod codec;
48/// Error types raised by codec operations.
49pub mod error;
50pub mod utils;
51#[cfg(feature = "verifier")]
52pub mod verifier;
53
54/// Re-export the allocator2 API for use.
55#[cfg(not(feature = "nightly"))]
56pub mod alloc {
57    pub use allocator_api2::{alloc::*, *};
58}
59
60#[cfg(feature = "nightly")]
61pub mod alloc {
62    pub use alloc::*;
63    pub use core::alloc::*;
64}