libmedium-0.13.2 has been yanked.
libmedium
A safe rust library to communicate with the sysfs interface of lm-sensors.
Usage
Just add this to your Cargo.toml file:
[]
= "0.12"
Cargo-Features
Standard features
writeable: Standard feature that enables all functions that write to sysfs. This includes setting pwm values and disabling sensors.sync: Build synchronous versions of all sensors.
virtual_sensors: Feature that lets you create virtual sensors. Virtual sensors don't belong to sysfs but can be any file provided by a driver or the user.
Non standard features
uom_units: Sensor values are returned as types from theuomcrate.unrestricted_parsing: This feature allows parsing of paths other than '/sys/class/hwmon'. This should only be useful for testing and debugging.async: Build asynchronous versions of all sensors.
Examples
- Print the temperature of all the temp sensors in your system:
use ;
let hwmons = parse_hwmons.unwrap;
for hwmon in &hwmons
- Set the pwm value of all your pwm capable fans to full speed (this requires the
writeablefeature to not be disabled):
use ;
let hwmons = parse_hwmons.unwrap;
for hwmon in &hwmons
License
This project is licensed under the MIT License - see the LICENSE file for details