You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is no need to remain ABI compatible with C for them as they can't be called from C anyway (except for when it is turned into a function pointer, then extern "C" needs to remain), yet does increase the amount of work necessary to clean up the output generated by c2rust.
The text was updated successfully, but these errors were encountered:
This is a good simple thing we should improve for non-address taken static in C/private in Rust fns. On the other hand, it is luckily not too hard to do for the majority of cases with a manual 3-step find and replace:
pub unsafe extern "C" fn => something
unsafe extern "C" fn => unsafe fn
something => pub unsafe extern "C" fn
Also, in my personal experience cleaning up and safetifying c2rust transpiled code, there was so much code to clean up in each function besides even safety that I used the existence of extern "C" as a marker for if I had cleaned up that function yet, rather than doing them wholesale at once.
Obviously, we'd much rather work on making the output much more manageable even before making it safe, and we hope to work more on such efforts when we have time to do so.
There is no need to remain ABI compatible with C for them as they can't be called from C anyway (except for when it is turned into a function pointer, then
extern "C"
needs to remain), yet does increase the amount of work necessary to clean up the output generated by c2rust.The text was updated successfully, but these errors were encountered: