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 SI measurement units.
Until 1.0.0
version API might change in any moment, be careful.
See full-featured battery-cli
crate at GitHub
or at crates.io.
For a simple example check battery/examples/simple.rs
in the repository
Experimental battery-ffi crate
provides the FFI bindings to the battery
crate, so it can be used with
another languages.
Check its README and documentation for details.