cpu_utils/lib.rs
1/*
2 * Copyright 2024 Fluence DAO
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
17#![warn(rust_2018_idioms)]
18#![warn(rust_2021_compatibility)]
19#![deny(
20 dead_code,
21 nonstandard_style,
22 unused_imports,
23 unused_mut,
24 unused_variables,
25 unused_unsafe,
26 unreachable_patterns
27)]
28
29mod cpu_topology;
30pub mod cpusets;
31mod errors;
32pub mod pinning;
33
34pub type CTResult<T> = Result<T, CPUTopologyError>;
35
36pub use ccp_shared::types::LogicalCoreId;
37pub use ccp_shared::types::PhysicalCoreId;
38pub use cpu_topology::CPUTopology;
39pub use cpu_topology::HwlocCPUTopology;
40#[cfg(feature = "mockall")]
41pub use cpu_topology::MockCPUTopology;
42pub use cpu_topology::NonEmpty;
43pub use errors::CPUTopologyError;