1 2 3 4 5 6 7 8 9 10 11 12 13 14
#![crate_type = "rlib"] extern crate foo; #[link(name = "bar", kind = "static")] extern "C" { fn bar(); } pub fn doit() { unsafe { bar(); } }