battery-ffi

Crates.iobattery-ffi
lib.rsbattery-ffi
version0.7.5
sourcesrc
created_at2019-02-22 18:52:22.54795
updated_at2019-11-26 12:40:23.429753
descriptionFFI bindings for battery crate
homepage
repositoryhttps://github.com/svartalf/rust-battery
max_upload_size
id116597
size51,145
svartalf (svartalf)

documentation

README

battery-ffi

Latest Version Latest Version Build Status dependency status Minimum rustc version Apache 2.0 OR MIT licensed backers Sponsors on Open Collective

Rust crate providing the FFI bindings for the battery library

Overview

This experimental library provides the FFI for the battery crate, so it can be used with other languages, such as C, Python or NodeJS.

See the documentation for available functions.

Install

Clone the repository and run the following command in the battery-ffi/ folder:

cargo build --release

This will generate the library file (.so, .dylib or .dll depending on your OS), which can be found at the ./target/release folder after the compilation.

In addition, compilation process will create the battery_ffi.h file, which might be useful for automatic bindings generation or just with plain C or C++ development.
It will be located somewhere at target/*/build/battery-ffi-*/out/, depending on the build profile (debug/release) and build hash.

Examples

battery-ffi/examples/ folder in the repository contains examples for C and Python.

License

Licensed under either of Apache License 2.0 or MIT license at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Donations

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

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

Commit count: 86

cargo fmt