Refactor topshim with bindgen and unsafe code
Writing topshim interfaces is very tedious and lots of code is duplicated in C++. Rather that depend on unsafe C++ code, we write a small amount of unsafe Rust code and use macros to interact with the native layer directly from Rust. A few major changes introduced in this patch: - Bindgen to get Rust interface into C - Macros to call raw pointer functions directly - Macros to handle converting a callback into an enum variant - Refactor code to use new data structures - Replace use of closures for callbacks with an enum and dispatch fn This change also updates the bindgen requirement to 0.57 to match what Android is already using. BYPASS_INCLUSIVE_LANGUAGE_REASON=Bindgen dependency provides this api Bug: 183208689 Tag: #floss Test: atest --host bluetooth_test_gd Change-Id: Iebe904ebc2643b48d1a371051fbf3c06f2bf04d4
Loading
Please register or sign in to comment