Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple crates in a .crate file #2203

Open
nrc opened this issue Dec 9, 2015 · 7 comments
Open

Support multiple crates in a .crate file #2203

nrc opened this issue Dec 9, 2015 · 7 comments
Labels
C-enhancement Category: enhancement Command-publish S-needs-rfc Status: Needs an RFC to make progress.

Comments

@nrc
Copy link
Member

nrc commented Dec 9, 2015

For example, allow path dependences to be added to the .crate file or allow published crates to depend on a GitHub repo.

@huonw
Copy link
Member

huonw commented Dec 9, 2015

The path dependencies are handled by publishing them separately, e.g. foo can depend on bar = { path = "bar", version = "0.1" }, which will get automatically rewritten to a bar = "0.1" dependency when published.

Depending on external resources is against crates.io's philosophy: crates.io tries to ensure that it contains everything it needs to build, and depending on a random external URL will suffer from e.g. link-rot.

@nrc
Copy link
Member Author

nrc commented Dec 9, 2015

For path deps, I am proposing that an alternative, additional publication style should be supported where they are combined into the .crate file.

@alexcrichton
Copy link
Member

Would a different title for this issue perhaps be "support more than one crate in a .crate file"? @huonw is right in that not relying on unpublished crates is a feature of crates.io (rather than a bug) to ensure everything builds, and that's the same reason that git dependencies aren't allowed. One of the nice aspects of crates.io are the reproducible builds, but that does have some limitations!

Architecturally it would be quite difficult to support more than one crate in a .crate file I think, but not necessarily impossible.

@thepowersgang
Copy link

I'd like to note my support for multiple crates per "package" - Mostly to prevent the proliferation (and management overhead) of helper-only crates. See https://crates.io/crates/va_list-test/

@nrc nrc changed the title Should be a way to publish crates which depend on unpublished crates Support multiple crates in a .crate file Dec 13, 2015
@carols10cents carols10cents added the C-enhancement Category: enhancement label May 11, 2017
@dwijnand
Copy link
Member

@weihanglo weihanglo added the S-triage Status: This issue is waiting on initial triage. label May 14, 2023
@epage
Copy link
Contributor

epage commented Sep 19, 2023

See also rust-lang/rfcs#3452

@epage epage added Command-publish S-needs-rfc Status: Needs an RFC to make progress. and removed S-triage Status: This issue is waiting on initial triage. labels Sep 19, 2023
@epage
Copy link
Contributor

epage commented Oct 14, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: enhancement Command-publish S-needs-rfc Status: Needs an RFC to make progress.
Projects
None yet
Development

No branches or pull requests

8 participants