I'm working on a CLI tool that (among other functions) will provide an ergonomic user interface wrapper around an existing C executable. I'm trying to figure out how I can get my crate's binary and the C executable to be distributed via cargo install
.
So far, I have:
- Add the C tool's git repository to my crate as a git submodule.
- Create a
build.rs
build script that uses thecmake
library to build the C tool when I runcargo build
. - Configure a
[[bin]]
target for my wrapper executable.
Naturally, running cargo install
installs the wrapper exe, but not the C tool. My read of the cargo install
docs tells me that the only way I can install an executable is for it to be the result of building a Rust source file.
Is there a workaround for this? Thanks!