3 releases

0.1.2 Mar 24, 2024
0.1.1 Mar 24, 2024
0.1.0 Mar 24, 2024

#237 in Operating systems

Download history 151/week @ 2024-03-18 109/week @ 2024-03-25 73/week @ 2024-04-01

333 downloads per month

MPL-2.0 license

23KB
352 lines

hardware-buffer-rs

Crates.io Version Crates.io License Docs

Bindings for libandroid.so's AHardwareBuffer functions.
Provided are safe wrappers for the functions and a reference-counting AHardwareBuffer smart pointer.

Visit the Android documentation for details about the functions.


lib.rs:

[HB] is an exposed singleton that dynamically loads libandroid.so on first access, reads the API version (accessible as HBHolder::api_level) and provides safe wrappers for the functions.

[HBRef] is a reference-counted AHardwareBuffer pointer.

All other types are generated from the NDK's hardware_buffer.h and dependent header files.

Dependencies

~0.2–2MB
~40K SLoC