Creating a Pool of Callbacks from Rust to C++ with Proc Macros
Attribution: https://www.pickpik.com/water-water-jet-fountain-red-stripes-wells-143820

Creating a Pool of Callbacks from Rust to C++ with Proc Macros

Hey folks ??

When writing our Software Defined Vehicle framework Eclipse uProtocol we decided on using Rust for the uStreamer service, which bridges between different underlying protocols (e.g. ZettaScale Technology 's Zenoh and SOME/IP).

In order to interoperate between high compute devices and mechatronics devices (think e.g. brake controllers or IMUs) we needed to communicate over SOME/IP. We chose to write a Rust wrapper over top of Connected Vehicle Systems Alliance (COVESA) 's vsomeip.

I wrote a Rust procedural macro which generates the thousands of extern "C" fns necessary to register and recycle for use when registering message handlers with vsomeip. Had to dig in a bit to troubleshoot the compile time explosion that happened and resolve it.

Read on for more ??

https://petelevasseur.com/articles/016-rust-cpp-proc-macro.html

要查看或添加评论,请登录

Pete LeVasseur的更多文章

社区洞察

其他会员也浏览了