-
Notifications
You must be signed in to change notification settings - Fork 329
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
Extern "C" functions being re-exported #709
Comments
Can you annotate them on the source with |
Comment |
This works on the module level, but not just on an I think the bigger question is why Happy to look at a fix if there is not a specific reason for the current behaviour. |
I think this works now.
Generates only foo. As for why extern {} and extern "C" {} are different, that's cbindgen being overly restrictive. |
Thanks for the fix, but oops Suricata was not ready and is not compiling anymore with cbindgen 0.27 OISF/suricata#11622 should fix it |
We have an application that is part Rust, part C. We use
extern "C" {
to define C functions to Rust. However,cbindgen
appears to re-export these back out. Short of listing all these in the exclude list, can they still be ignored?We still want to export Rust functions that are declared extern so our C code can bind to them.
Note: When just
extern {
is used these C functions are not re-exported, but we'd like to use as manyrustfmt
defaults as possible, which rewrites these toextern "C"
.The text was updated successfully, but these errors were encountered: