3 ms·
What do you do when your Rust project requires a dependency written in something other than Rust?
by uxp8u61q 3y ago
What do you do when your Rust project requires a dependency written in something other than Rust?
- steveklabnik 3y agoYou use a "build script" to hook into the compilation process and have it invoke the build of whatever it is you're trying to additionally build. And if it's not that big, say, a single C file, you can just invoke the C compiler. An example: https://crates.io/crates/cc https://crates.io/crates/cc
- mustache_kimono 3y agoSee: https://doc.rust-lang.org/cargo/reference/build-scripts.html https://doc.rust-lang.org/cargo/reference/build-scripts.html