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

Analysis of extern "C" functions and all reachable types #31

Open
shepmaster opened this issue Nov 26, 2022 · 0 comments
Open

Analysis of extern "C" functions and all reachable types #31

shepmaster opened this issue Nov 26, 2022 · 0 comments
Labels
A-user-story Area: A user story or a related issue

Comments

@shepmaster
Copy link

One of our clients was exposing a C API from Rust. That C API would then be consumed via languages such as JavaScript or C#. The creation of such an API is very mechanical and fiddly, requiring that the exposed Rust information match exactly to the C / JS / C# definitions.

To reduce failure points, I wanted to analyze the code to find all extern "C" functions and then find all types referenced in the function signature. This data could be dumped to a file for further processing.

cbindgen helps with creating a C or C++ header file from Rust code, but does not help much for the bindings for other languages. My envisioned use case would allow more user flexibility.

@shepmaster shepmaster added the A-user-story Area: A user story or a related issue label Nov 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-user-story Area: A user story or a related issue
Projects
None yet
Development

No branches or pull requests

1 participant