-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Should externfn! include an abi? #10074
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
Comments
I'm not really opposed to this, but I'm not sure I'd say it's "recommended" to use |
@nikomatsakis: I figured it was recommended because of the tutorial-ffi document. It talks about how |
Likely a non-issue, since we are removing segmented stacks and thus (hopefully) the need for |
Closes rust-lang#10074 changelog: [`redundant_clone`]: fix FP on enum cast
It's now recommended to use
externfn!(...)
to bind to a C library function, but those external functions are being declared with the implicitRust
abi. For example, this script errors out:It errors with:
Swapping the comments gets it to compile fine. Is this safe? Given that #10052 says the Rust ABI is not precisely defined as the C ABI, should we change
externfn!
to include an ABI argument to future proof our bindings?The text was updated successfully, but these errors were encountered: