From 51bb051414bcc8ae47108de33288980290cda821 Mon Sep 17 00:00:00 2001 From: Matt Harding Date: Sun, 12 Mar 2023 20:35:56 +0000 Subject: [PATCH] Change incorrect reference to "above" in ffi.md --- src/ffi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ffi.md b/src/ffi.md index 684e712..55be225 100644 --- a/src/ffi.md +++ b/src/ffi.md @@ -258,7 +258,7 @@ pub extern "C" fn hello_from_rust() { # fn main() {} ``` -The `extern "C"` makes this function adhere to the C calling convention, as discussed above in "[Foreign Calling Conventions]". +The `extern "C"` makes this function adhere to the C calling convention, as discussed below in "[Foreign Calling Conventions]". The `no_mangle` attribute turns off Rust's name mangling, so that it has a well defined symbol to link to. Then, to compile Rust code as a shared library that can be called from C, add the following to your `Cargo.toml`: