2020-01-21 22:47:03 -08:00
|
|
|
#![crate_type = "cdylib"]
|
|
|
|
|
|
|
|
extern crate bar;
|
|
|
|
|
|
|
|
#[no_mangle]
|
2020-09-01 17:28:11 -04:00
|
|
|
pub extern "C" fn foo() {
|
2020-01-21 22:47:03 -08:00
|
|
|
bar::bar();
|
|
|
|
}
|
|
|
|
|
|
|
|
#[no_mangle]
|
2020-09-01 17:28:11 -04:00
|
|
|
pub extern "C" fn bar(a: u32, b: u32) -> u32 {
|
2020-01-21 22:47:03 -08:00
|
|
|
a + b
|
|
|
|
}
|