Skip to content
Rust crate providing cross-platform information about batteries.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
battery-ffi Bumping few more dependencies and adding badges Apr 6, 2019
battery Bounding state_of_health and state_of_charge values to the 0.0 ≤ x ≤ … Apr 12, 2019
ci Integrate uom types Mar 6, 2019
.editorconfig Integrate uom types Mar 6, 2019
.gitignore
.travis.yml
CHANGELOG.md Bounding state_of_health and state_of_charge values to the 0.0 ≤ x ≤ … Apr 12, 2019
Cargo.toml
Cross.toml FreeBSD/DragonFlyBSD support Feb 24, 2019
LICENSE-APACHE
LICENSE-MIT
README.md Removing [patch] section from the workspace Cargo manifest Apr 6, 2019
rustfmt.toml Implementing proper errors handling. Mar 10, 2019

README.md

battery

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

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.

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.

Examples

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

For a simple example check 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.

You can’t perform that action at this time.