in main.rs: ```rs #[link(name = "test")] extern "C" { pub fn multiply(a: u32, b: u32) -> u32; } ``` in test.c ```c #include uint32_t multiply(uint32_t a, uint32_t b) { return a * b; } ``` In `build.rs`: ```rs fn main() { // println!("cargo::rustc-link-lib=test") println!("cargo:rustc-link-search=c_src"); } ``` archive created with: `arm-none-eabi-gcc.exe -mthumb -mcpu=cortex-m4 -std=c99 -c -g3 .\test.c` `arm-none-eabi-ar.exe -rcs libtest.a test.o`