I'm looking for some guidance on best practices in binary package development for various OS target platforms. Specifically, I'm interested in any solutions—like libraries, frameworks, project templates, build pipeline configurations, or tools that help with managing declarative documents (such as manifests, package.json, makefiles, gradle files, etc.)—to structure a project that outputs multiple package formats, such as a library package and several applications with dependencies on that library.
I'd love to know what it takes to build a project in this way and what tools could simplify the process. I'm particularly interested in features that help reduce manual configurations, like automated versioning and packaging, or declarative file generation from templates. I understand that the choice of SDK or programming language can affect this process, so I'm curious to know which ones have the most mature and publicly available development toolkits according to those criteria.
3 Answers
Consider using Rust with Cargo workspaces or Python with Poetry. Both support shared libraries, automatic versioning, and templating for packaging. Rust is generally stricter and more efficient, while Python offers more dynamic capabilities.
A modern approach to packaging is to use an OCI container image and push it to an OCI registry. Tools like Docker are great for this. They allow you to package your application along with all its dependencies, making it portable across different environments.
If you're aiming for Linux, native package building tools are quite effective. They offer a lot of flexibility and let you layer your approach. You can adopt tools for building deb or rpm packages, and platforms like SUSE OBS help manage that. It’s easy to generate packaging files from a single definition, which streamlines the process.
Sounds intriguing! What specific tools would you recommend for this? I’d love to dive deeper.
That's a good point! And to keep the size down, if my executable doesn’t rely on the OS, can I use a `scratch` image to layer my build?