tao_of_rust::ch13::ffi
pub fn hello_c()
Basic usage: Rust中调用C标准库函数
extern "C" { fn isalnum(input: i32) -> i32; } fn main() { unsafe { println!("Is 3 a number ? the answer is : {}", isalnum(3)); // println!("Is 'a' a number ? ", isalnum('a')); } }Run