axodotdev / axodotdev/cargo-dist

Multiple binaries in a single App?

Open
#2,408 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2.1k
Forks
149
Avg merge
1d 11h
Merged PRs (30d)
32

Description

Hello and thank you for working on this project! I am deeply interested in using cargo dist, but I think I stumbled upon this [currently unimplemented use case](https://axodotdev.github.io/cargo-dist/book/reference/concepts.html#defining-your-apps):

> There is currently no way to group multiple packages into a single App, although there probably will be one day.

I could not find the associated issue here, though I think this fits my scenario! [DICOM-rs](https://github.com/Enet4/dicom-rs) encompasses library crates as well as multiple binaries dispersed over multiple packages, but which I want to deliver together in a single archive file per version per platform (example: `dicom-rs-tools-v0.9.0-x86_64-unknown-linux-gnu.tar.gz`). Basically, the various binaries are bundled as a single "toolkit" for working with DICOM data and DICOM-compliant services, in a similar vein to other DICOM toolkits.

> if a package defines multiple binaries then they will be considered part of the same App and zips/[installers](https://axodotdev.github.io/cargo-dist/book/installers/index.html) for it will contain/install all of them. We figure if you went out of your way to have multiple binaries under one package (as opposed to separate packages for each), you did that for a reason!

I understand that in order to have this right now with cargo dist, I would need to put every binary of the toolkit in a single package? This would affect the structure of the project in a way which might be undesirable. In particular, some of the binaries are closely tied to their respective library crate, and other tools may still have a lot of dedicated code that would have to be crammed together.

So I wonder, is there still interest in supporting multiple packages into a single App? How could one assist in bringing this capability upstream?

Contributor guide

Open the contributing guide

Research direction

Start with the cargo-dist concepts page section on defining Apps and the installers documentation to understand the current single-package model. Trace how packages and binaries are grouped for archives and installers; done means multiple packages can be delivered together as one platform-specific App archive and installer set.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, release
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.