-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Go/Core Refactor: Move FFI to a Dedicated Folder for Reusability #3372
base: main
Are you sure you want to change the base?
Conversation
7c71bda
to
45daae4
Compare
ffi/.gitignore
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jamesx-improving please verify go CD pipeline that it still commit header file
ffi/src/lib.rs
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This lib actively uses protobuf, while C# client - doesn't.
So I see two variants there
- We will be having 2 FFI interfaces
- Rework golang bindings to avoid using protobuf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to clean up some code comments which refer to golang
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- If 2 isn't possible, put protobuf functions under a feature flag. Please do it in the C# implementation.
.github/workflows/ffi.yml
Outdated
working-directory: ffi | ||
run: | | ||
cargo build --release | ||
- name: Generate the C header file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is needed for go client only and does not test the code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it isn't go-specific, it can be used in other FFI wrappers as well (C++ for example)
…other wrappers Signed-off-by: barshaul <[email protected]>
Signed-off-by: barshaul <[email protected]>
This PR relocates the FFI interface from the Go folder to a dedicated ffi folder, making it reusable for other language wrappers.
Currently, the FFI C-Rust implementation is located under the Go folder since it has only been used for Go. However, as we expand support for additional wrappers, such as the C# and Python Sync clients, which will communicate via FFI instead of UDS, we need to move the logic out of the Go folder to improve reusability and maintainability.
Issue link
This Pull Request is linked to issue (URL): #3373
Checklist
Before submitting the PR make sure the following are checked: