-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Comments
The path dependencies are handled by publishing them separately, e.g. 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. |
For path deps, I am proposing that an alternative, additional publication style should be supported where they are combined into the .crate file. |
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. |
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/ |
Looks similar to boats' idea in https://internals.rust-lang.org/t/multiple-libraries-in-a-cargo-project/8259. |
See also rust-lang/rfcs#3452 |
Also, another prior thread on this: https://users.rust-lang.org/t/publish-crate-without-publishing-local-sub-crates/11299 |
For example, allow path dependences to be added to the .crate file or allow published crates to depend on a GitHub repo.
The text was updated successfully, but these errors were encountered: