/ std / src / lib.rs
lib.rs
 1  // Copyright (c) 2025 ADnet Contributors
 2  // This file is part of the adnet-core 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  //! ADnet Core Standard Library
17  //!
18  //! This crate provides common utilities used across ADnet repositories including:
19  //! - CPU information retrieval
20  //! - Storage mode management
21  //! - Profiling and timing utilities
22  
23  #[cfg(feature = "cpu")]
24  pub use adnet_core_cpu::{get_cpu, Cpu};
25  pub use adnet_core_profiler::*;
26  #[cfg(feature = "storage")]
27  pub use adnet_core_storage::{
28      alpha_dir, alpha_ledger_dir, alpha_secondary_ledger_dir, StorageMode,
29  };
30  // Backwards compatibility re-exports
31  #[cfg(feature = "storage")]
32  #[allow(deprecated)]
33  pub use adnet_core_storage::{aleo_dir, aleo_ledger_dir, aleo_secondary_ledger_dir};
34  
35  pub mod prelude {
36      #[cfg(feature = "cpu")]
37      pub use adnet_core_cpu::{get_cpu, Cpu};
38      pub use adnet_core_profiler::*;
39      #[cfg(feature = "storage")]
40      pub use adnet_core_storage::{
41          alpha_dir, alpha_ledger_dir, alpha_secondary_ledger_dir, StorageMode,
42      };
43      pub use adnet_core_time::time;
44      pub use adnet_core_timed::timed;
45      pub use adnet_core_timer::{finish, lap, timer};
46  }