What is the correct way to include precompiled static library within crate

Hello !

Pretty much everything is in the title.
I have a precompiled static library I need to deliver with the crate for linking. (I don't have the source, only .a/.lib + .dll/.so )
What is the recommended way to include a precompiled static library used during linking with a crate?

Thank you.

1 Like

Make build.rs script that outputs link instructions for Cargo.



You can also put it in a separate sys crate to make it reusable.

1 Like

Thank you!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.