battery 0.7.4

Cross-platform information about batteries
Documentation

battery

Latest Version Latest Version Build Status dependency status Minimum rustc version Apache 2.0 OR MIT licensed backers

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.

Supported platforms

  • Linux 2.6.39+
  • MacOS 10.10+
  • Windows 7+
  • FreeBSD
  • DragonFlyBSD

API stability

Until 1.0.0 version API might change in any moment, be careful.

Rust version requirements

Both battery and battery-ffi crates are requiring at least Rustc version 1.31 or greater.

Examples

See the full-featured battop TUI application at GitHub or at crates.io.

For a simple example check out the battery/examples/simple.rs in the repository

FFI

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.

Donations

If you appreciate my work and want to support me, you can do it here or support this project at Open Collective.