I’ve got a C library (libseccomp) that I’d like to use with my bigbro crate. It works fine on my own machine, but now that I’ve introduced this dependency, anyone installing it on linux needs to run
apt install libseccomp-dev or the equivalent, which is a nuisance. I know that the
git2 crate builds the git2 library from source if it is not installed. Should I do something similar? Looking at the
build.rs from git2 is not encouraging: it looks rather complicated. But then, libgit2 itself has dependencies, where
libseccomp is basically self contained.
Any suggestions how to best handle this? I think the best plan is to build from source when it’s not available, but I feel daunted by dealing with that. So suggestions for how to write a simple
build.rs (or pointers to simpler examples than that of git2) will also be appreciated!