Rust::com FFI Type Lookup Optimization on Fast Path#541
Open
bharatGoswami8 wants to merge 10 commits into
Open
Rust::com FFI Type Lookup Optimization on Fast Path#541bharatGoswami8 wants to merge 10 commits into
bharatGoswami8 wants to merge 10 commits into
Conversation
* TypeOperation is part of MemberOperation * Added typeOperation related method in cpp and rust * Producer side updated with TypeOperation
* Update SamplePtr related method to use TypeOperation * Updated consumer method to take typeOperation as parameter
* Updated the safety comment
* Removed the registry related types and function * Removed registry creation from macro
* Added Option return for FFI method * Added error handing for consumer and producer type_ops
* Added const in GetType * Updated type_ops in producer
* Update test cases and mock FFI
* Updated Receive poll method * General Optimization
effec41 to
f93a190
Compare
* Fix the clippy warning error
bd846a9 to
77c9901
Compare
81a0d45 to
2aedd32
Compare
2aedd32 to
73a84ca
Compare
* Added const on FFI methods * Added Copy Marker trait * Updated clone of type_ops
73a84ca to
b961ca4
Compare
darkwisebear
approved these changes
Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces string-based event/type identifiers across C++ and Rust FFI with an opaque
TypeOperationshandle propagated as a RustTypeOperationsManager.Adds
mw_com_get_type_ops_instanceandget_type_ops_instance, updates all sample/allocatee/event FFI paths to accept/forwardTypeOperationsand removes event-type params from proxy receive-handler APIs.Approach:
Store the
TypeOperationsinstance pointer withinMemberOperationand pass it to the Rust side using a getter. On the Rust side, we define an opaque struct that holds this pointer during subscription and publisher creation. Instead of passingT::ID,we now pass the type_operation pointer as a parameter to C++. This removes the need for repeated lookups on the C++ side, allowing us to directly invoke the underlyingTypeOperationsfunctions and APIs.