extern "C" gives a Rust function C calling conventions so C code can call it across an FFI boundary. A named C entry point also needs pub and #[no_mangle], while a callback passed by address needs only extern "C". section 4.4
Use the annotation according to how the function crosses the boundary:
- Mark an exported handler as pub unsafe extern "C" and #[no_mangle} when C calls it by name. section 4.4
- Mark a callback as unsafe extern "C" when C supplies or invokes it through a function pointer. section 4.4
- Omit extern "C" for functions called only by Rust; they retain Rust calling conventions and are not callable from C. section 4.4
NGINX request callback
unsafe extern "C" fn read_body_handler(r: *mut ngx_http_request_t) { ... }

