Suggested workflow for handling c src dependencies in packages

I have a private package (lets call it MyPkg.jl) that requires wrapping a very minimal c library. This c library provides a small subset of the package’s total capabilities. I have been playing w/ BinaryBuilder and I’ve been able to deploy a _jll package locally. However, this seems overkill for my needs. If I understand the BinaryBuilder docs correct, it seems like I would need to maintain a URL for the c src and a _jll repo in addition MyPkg.jl itself. Also, it is not clear of how these all interact. E.g. it seems to assume some upstream CI for building. I would prefer to keep all non-general repository dependencies self-contained in the MyPkg.jl repository.

Is there a recommended workflow for shipping the c source w/ the julia package and automatically building for the specific system?

If using the BinaryBuilder _jll is recommended, is there a way to deploy to a non GitHub repo, e.g. a private GitLab?

Is GitHub - JuliaPackaging/Yggdrasil: Collection of builder repositories for BinaryBuilder.jl not an option?

No, the source code is private

You can just keep the source with the package itself. When you add the package, Julia calls the deps/build.jl script, which can just call your makefile. You have to actually be able to build the source on the machines where you add the package, of course.

Would it make any sense to use deps/build.jl to call a BinraryBuilder build_tarballs.jl targeting the host platform with something like platform = [parse(Platform, Base.BinaryPlatforms.host_triplet())] so to not require build tools explicitly on the host machine?

1 Like