-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
FFI tutorial: explicitly document how to define a function callable from C #10489
Labels
A-FFI
Area: Foreign function interface (FFI)
Comments
part of #11755 |
That covers a bit of it, but there's no discussion of |
It also doesn't mention the necessity to catch failure and either translate it into an error for the C caller or |
steveklabnik
added a commit
to steveklabnik/rust
that referenced
this issue
Jan 16, 2015
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Mar 24, 2023
New lint: detect unnecessary struct building Fixes rust-lang#10476. Running this lint on the top 500 crates produced one hit (in `rust-lang/rust-bindgen`) and [a PR has been submitted there](rust-lang/rust-bindgen#2440). changelog: [`unnecessary_struct_initialization`]: new lint
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Apr 6, 2023
…zation-nursery, r=flip1995 Move unnecessary_struct_initialization to nursery changelog: none, assuming it makes into the same release as rust-lang#10489 Mostly because of rust-lang#10547 but there is also rust-lang#10548
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I believe one is able to define C -> Rust function (Rust code callable from C) like this:
but the construction above is at best only hinted at in the current tutorial-ffi.md
The text was updated successfully, but these errors were encountered: