1 2 3 4 5 6 7 8 9 10
#![crate_type = "rlib"] #[link(name = "cfoo", kind = "static")] extern "C" { fn foo(); } pub fn rsfoo() { unsafe { foo() } }