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]]
|
[[package]]
|
||||||
name = "mtemp"
|
name = "mtemp"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"serde",
|
"serde",
|
||||||
|
@ -10,7 +10,13 @@ readme = "README.md"
|
|||||||
keywords = ["temperature", "cli", "nvidia", "amd"]
|
keywords = ["temperature", "cli", "nvidia", "amd"]
|
||||||
categories = ["command-line-utilities"]
|
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]
|
[dependencies]
|
||||||
anyhow = "1.0.79"
|
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::anyhow;
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use core::f64;
|
use core::f64;
|
||||||
@ -5,10 +8,6 @@ use serde::Deserialize;
|
|||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
|
||||||
use crate::sensor_names::CPU_NAMES;
|
|
||||||
use crate::sensor_names::DISK_NAMES;
|
|
||||||
use crate::sensor_names::TEMP_NAMES;
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct SensorData {
|
pub struct SensorData {
|
||||||
chips: BTreeMap<String, Sensor>,
|
chips: BTreeMap<String, Sensor>,
|
||||||
|
Loading…
Reference in New Issue
Block a user