Crates.io | battery-ffi |
lib.rs | battery-ffi |
version | 0.7.5 |
source | src |
created_at | 2019-02-22 18:52:22.54795 |
updated_at | 2019-11-26 12:40:23.429753 |
description | FFI bindings for battery crate |
homepage | |
repository | https://github.com/svartalf/rust-battery |
max_upload_size | |
id | 116597 |
size | 51,145 |
Rust crate providing the FFI bindings for the
battery
library
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.
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.
battery-ffi/examples/
folder in the repository
contains examples for C and Python.
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.
If you appreciate my work and want to support me, you can do it here or support this project at Open Collective.
This project exists thanks to all the people who contribute.
Thank you to all our backers! 🙏 [Become a backer]
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]