diff --git a/rust/linking_with_c/README.rst b/rust/linking_with_c/README.rst index fa53e2e..66d09b7 100644 --- a/rust/linking_with_c/README.rst +++ b/rust/linking_with_c/README.rst @@ -17,7 +17,7 @@ In the Rust file, - Add all external functions at the top with ``extern{}`` block - Add a link decorator like ``#[link(name = "myfunctions")]`` - + OR set the link in the build.rs file ``println!("cargo:rustc-link-lib=multiply");`` + + OR set the link in the build.rs file ``println!("cargo:rustc-link-lib=myfunctions");`` - Add ``extern crate libc;`` and ``use libc::c_int`` and all other datatypes needed - When calling the C function, wrap in an ``unsafe{}`` block