Rust supports the creation of [[foreign function interface]]s (FFI) through the {{rust|extern}} keyword. A function that uses the C [[calling convention]] convention can be written using {{rust|extern "C" fn}}. Symbols can be exported from Rust to other languages through the {{rust|#[no_mangle]}} attribute, and symbols can be imported into Rust through {{rust|extern}} blocks:{{refn|group=note|wrapping {{code|no_mangle}} with {{rust|unsafe}} as well as prefacing the {{rust|extern "C"}} block with {{rust|unsafe}} are required in the 2024 edition or later.<ref>{{Cite web |last=Baumgartner |first=Stefan |date=2025-05-23 |title=Programming language: Rust 2024 is the most comprehensive edition to date |url=https://www.heise.de/en/background/Programming-language-Rust-2024-is-the-most-comprehensive-edition-to-date-10393917.html |access-date=2025-06-28 |website=[[heise online]] |language=en}}</ref>}}{{sfn|Gjengset|2021|pp=193-209}}