Skip to content
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

Auto generate rust bindings using rust bindgen #4723

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

youyuanwu
Copy link
Contributor

Description

The FFI definitions for rust should be auto generated instead of manually written.
This PR adds a new rust crate with auto generated bindings aiming to replace or remove all the manual bindings in the existing crate. Existing code is not changed. In future, the safe rust wrappers should be written on top of this generated bindings.

supersede #4696 . This PR uses rust bindgen instead of windows bindgen that has better cross platform support.
Generated code is checked in, and an "overwrite" feature can be used to regenerate the code.
TODO: macos needs to be added.

Testing

NA. Generated code compiles.

Documentation

NA

Copy link

codecov bot commented Dec 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.77%. Comparing base (10f2487) to head (e00a02f).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4723      +/-   ##
==========================================
- Coverage   87.17%   86.77%   -0.41%     
==========================================
  Files          56       56              
  Lines       17363    17363              
==========================================
- Hits        15137    15066      -71     
- Misses       2226     2297      +71     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nibanks nibanks added the Language: Rust Related to the Rust interop layer label Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language: Rust Related to the Rust interop layer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants