adding lib files
This commit is contained in:
parent
2cedbf30e4
commit
8df05bb423
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -87,7 +87,7 @@ checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
|
||||
|
||||
[[package]]
|
||||
name = "mtemp"
|
||||
version = "0.1.1"
|
||||
version = "0.1.2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"serde",
|
||||
|
@ -10,7 +10,13 @@ readme = "README.md"
|
||||
keywords = ["temperature", "cli", "nvidia", "amd"]
|
||||
categories = ["command-line-utilities"]
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
[lib]
|
||||
name = "mtemp"
|
||||
crate-type = ["lib"]
|
||||
|
||||
[[bin]]
|
||||
name = "mtemp"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1.0.79"
|
||||
|
6
src/lib.rs
Normal file
6
src/lib.rs
Normal file
@ -0,0 +1,6 @@
|
||||
mod lm_sensors;
|
||||
mod mtemp;
|
||||
mod nvidia_smi;
|
||||
mod sensor_names;
|
||||
|
||||
pub use mtemp::Mtemp;
|
@ -1,3 +1,6 @@
|
||||
use crate::sensor_names::CPU_NAMES;
|
||||
use crate::sensor_names::DISK_NAMES;
|
||||
use crate::sensor_names::TEMP_NAMES;
|
||||
use anyhow::anyhow;
|
||||
use anyhow::Result;
|
||||
use core::f64;
|
||||
@ -5,10 +8,6 @@ use serde::Deserialize;
|
||||
use std::collections::BTreeMap;
|
||||
use std::process::Command;
|
||||
|
||||
use crate::sensor_names::CPU_NAMES;
|
||||
use crate::sensor_names::DISK_NAMES;
|
||||
use crate::sensor_names::TEMP_NAMES;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct SensorData {
|
||||
chips: BTreeMap<String, Sensor>,
|
||||
|
Loading…
Reference in New Issue
Block a user