A function signature specifies every parameter type, the return type, and the semantic role of each value. In a C FFI, matching the existing signature lets C call the Rust function. section 3.2
Matching a C function
The C declaration `int solve(char *line, int *solution)` becomes `fn solve(line: *const c_char, solution: *mut c_int) -> c_int` in Rust. The Rust signature additionally shows that `solution` may be modified while `line` is not. section 3.2







