ntp_usg/lib.rs
1// Copyright 2026 U.S. Federal Government (in countries where recognized)
2// SPDX-License-Identifier: Apache-2.0
3
4#![deprecated(
5 since = "3.0.0",
6 note = "The ntp_usg crate has been split into separate crates. \
7 Use `ntp_usg-proto` for protocol types, \
8 `ntp_usg-client` for client functionality, and \
9 `ntp_usg-server` for server functionality."
10)]
11#![deny(unsafe_code)]
12#![warn(missing_docs)]
13
14//! # DEPRECATED: This crate has been split into multiple crates
15//!
16//! **This crate is deprecated as of version 3.0.0.**
17//!
18//! The monolithic `ntp_usg` crate has been split into three focused crates:
19//!
20//! - **[`ntp_usg-proto`](https://crates.io/crates/ntp_usg-proto)**: NTP protocol types, extension fields, and NTS cryptographic primitives
21//! - **[`ntp_usg-client`](https://crates.io/crates/ntp_usg-client)**: NTP client library with sync, async (tokio/smol), and NTS support
22//! - **[`ntp_usg-server`](https://crates.io/crates/ntp_usg-server)**: NTP server library with tokio/smol and NTS-KE support
23//!
24//! ## Migration Guide
25//!
26//! ### For Client Users
27//!
28//! Replace:
29//! ```toml
30//! [dependencies]
31//! ntp_usg = "2.0"
32//! ```
33//!
34//! With:
35//! ```toml
36//! [dependencies]
37//! ntp_usg-client = "3.0"
38//! ```
39//!
40//! Update imports:
41//! ```rust,ignore
42//! // Old
43//! use ntp_usg::*;
44//!
45//! // New
46//! use ntp_client::*;
47//! ```
48//!
49//! ### For Server Users
50//!
51//! Add:
52//! ```toml
53//! [dependencies]
54//! ntp_usg-server = "3.0"
55//! ```
56//!
57//! Update imports:
58//! ```rust,ignore
59//! use ntp_server::*;
60//! ```
61//!
62//! ### For Protocol/Type Users
63//!
64//! If you only need protocol types and parsing:
65//! ```toml
66//! [dependencies]
67//! ntp_usg-proto = "3.0"
68//! ```
69//!
70//! Update imports:
71//! ```rust,ignore
72//! use ntp_proto::*;
73//! ```
74//!
75//! ## Compatibility Re-exports
76//!
77//! This crate re-exports all three new crates for backwards compatibility,
78//! but you will receive deprecation warnings when using it. We strongly
79//! recommend migrating to the new crates.
80
81#[deprecated(
82 since = "3.0.0",
83 note = "Use `ntp_usg-proto` crate directly: https://crates.io/crates/ntp_usg-proto"
84)]
85pub use ntp_proto as proto;
86
87#[deprecated(
88 since = "3.0.0",
89 note = "Use `ntp_usg-client` crate directly: https://crates.io/crates/ntp_usg-client"
90)]
91pub use ntp_client as client;
92
93#[deprecated(
94 since = "3.0.0",
95 note = "Use `ntp_usg-server` crate directly: https://crates.io/crates/ntp_usg-server"
96)]
97pub use ntp_server as server;
98
99// Re-export commonly used items for backwards compatibility
100#[deprecated(
101 since = "3.0.0",
102 note = "Use `ntp_usg-proto` or `ntp_usg-client` crate directly"
103)]
104pub use ntp_proto::{error, extension, protocol, unix_time};
105
106#[deprecated(
107 since = "3.0.0",
108 note = "Use `ntp_usg-client::request` from the `ntp_usg-client` crate"
109)]
110pub use ntp_client::request;