How do I include extern functions from dependency crates?

Viewed 226

I had some extern "C" functions in my Rust library; then I decided to split the library up into a bunch of crates and make one workspace crate that just re-exports everything from its members. However, now that I have done this, the symbols for these extern "C" functions are missing from the generated .so file. How can I fix this?

I tried re-exporting the extern "C" functions individually; this did not work. I also tried setting crate-type = ["cdylib"] on the crate containing the functions, and this didn't work either.

1 Answers

According to this GitHub issue, the behaviour I'm seeing is a bug and there doesn't seem to be any known solution besides wrapping the functions that I want to re-export.

Related