battery
Rust crate providing cross-platform information about batteries.
Gives access to a system independent battery state, capacity, charge and voltage values
recalculated as necessary to be returned in W
, Wh
or V
units.
Supported platforms
- Linux 2.6.39+
- MacOS (10.10+ probably, needs to be confirmed)
- Windows 7+
API stability
Until 1.0.0
version API might change in any moment, be careful.
Example
This crate acts both as library and as binary executable, so you can install and check it:
- Install
battery
crate:
- Call the installed file:
I guess I'll need to replace my battery soon 😩