Skip to content

Glossary: Rust in Practice

extern "C"

Also written: unsafe extern "C", extern

Tells Rust to use C's calling rules. An `unsafe extern "C"` block declares C functions that Rust can call, each call needing `unsafe`.

Where the book teaches it

Related terms

ABI (application binary interface)FFI (foreign function interface)