-
Notifications
You must be signed in to change notification settings - Fork 327
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
Generate bindings for private extern
functions by default
#822
Comments
to make a more convincing case I'm providing steps to reproduce:
[package]
name = "example"
version = "0.1.0"
edition = "2021"
[lib]
crate-type = ['cdylib']
[profile.release]
lto = true # NOTE: I've even enabled LTO #[no_mangle] // NOTE: If `no_mangle` is removed the function will not be exported
extern fn i_am_exported() {}
I hope this makes a convincing enough case that current default behavior of NOTES:
|
merged |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Rust compiler will always export private
extern
functions. We can say that visibility rules don't apply forextern
functions. Considering this, generating C bindings for privateextern
functions should be opt-out. In the meantime, is there some way to opt-in generating bindings for private functions?The text was updated successfully, but these errors were encountered: