12 releases
0.7.5 | Nov 26, 2019 |
---|---|
0.7.4 | Jun 3, 2019 |
0.7.3 | May 30, 2019 |
0.7.1 | Apr 6, 2019 |
0.1.5 | Feb 28, 2019 |
#462 in Operating systems
175KB
3.5K
SLoC
battery-ffi
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]
Dependencies
~1.2–3MB
~52K SLoC