-
Notifications
You must be signed in to change notification settings - Fork 50
How should workspaces be handled? #49
Comments
Just as a data point, in our project I'm just calling cargo deb in particular crate I need to package (it just exposes FFI bindings to the other crate in a workspace) and in that configuration I don't see a need for special workspace support, apart from maybe a better error message (currently it complains about lack of |
Adding another datapoint :
We don't have at the moment the need to create a deb containing all the crates of a workspace. |
I also have been successfully using |
Currently, my workspace has three crates in it.
* basically just a wrapper around the daemon that speaks the service management protocol and logs stdout to the event viewer |
I have a project that could really use this. I have multiple binaries that are all inter-related, and library crates built as .so files that they share between them. I would love to be able to easily construct a single .deb that packages this all up properly. |
I've added
|
any suggested workaround to build one deb from multiple crates? |
This seems to be a viable workaround: Pick an arbitrary package like foocli to be the deb package. Add to foocli Cargo.toml:
Then for creating the deb:
@kornelski Along the lines of this workaround, without having to answer all the complexities in the OP, could you just require This would improve above in that I could just run plain |
Currently cargo-deb builds with |
Thanks @kornelski . The
However, choosing I've tried putting a
Without this verification, it may work as expected with the assets definition replacing the need for target information. |
For a project I work on, we are currently using cargo deb in a workspace, and for the way we use it it would be useful if we could set some package fields at the workspace level. The main ones would be version and revision. Maintainer might also be useful too. I would imagine that this could just be added in the workspace level Cargo.toml, and any fields set in a sub-project would override the workspace value. |
There is an RFC for sharing metadata at the workspace level: rust-lang/rfcs#2906 |
@kornelski, thanks, I was not aware of that, the RFC looks hopeful. I would assume any progress on cargo deb in this respect would be waiting on that? |
I mean that's the direction cargo is taking. Any solution for cargo-deb should probably mimic that. |
Currently,
cargo-deb
always assumes its target crate is a single binary crate that makes a single debian package. It doesn't do anything special for Cargo workspaces. Should it?How should a Cargo workspace translate to a Debian package? If you run
cargo deb
in the root of a workspace:Would you expect cargo-deb to handle shared libraries? Do you make debs for dynamic libraries (cdylib type) and binaries that depend on them?
The text was updated successfully, but these errors were encountered: