rust/tests/run-make/c-static-dylib/foo.rs

11 lines
136 B
Rust
Raw Normal View History

#![crate_type = "dylib"]
2016-12-05 18:31:05 -06:00
#[link(name = "cfoo", kind = "static")]
2020-09-01 16:12:52 -05:00
extern "C" {
fn foo();
}
pub fn rsfoo() {
unsafe { foo() }
}