Rust crate providing cross-platform information about the notebook batteries.
Gives access to a system independent battery state, capacity, charge and voltage values recalculated as necessary to be returned SI measurement units.
- Linux 2.6.39+
- MacOS 10.10+
- Windows 7+
1.0.0 version API might change in any moment, be careful.
Rust version requirements
battery-ffi crates are requiring at least Rustc version 1.31 or greater.
For a simple example check out the
in the repository
Experimental battery-ffi crate
provides the FFI bindings to the
battery crate, so it can be used with