Linking a C library with Rust allows using it in Rust. However, I realised that when Rust links against it, it also makes the functions symbols private (pub keyword won't help), which means if I link the Rust library with C, I cannot access the functions.
Thanks for the info. But the document only shows how to export Rust functions to C. What I expect is to expose imported C functions back to C again.
I spent some time on this, and realised that when building Rust library into cdylib, rustc would apply some link time optimizations and remove symbols that are not used or not exposed (e.g. imported C functions are not exposed). If compiling Rust library into dylib or staticlib, all symbols stay. I am building my project into staticlib for now.