You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Historically Cargo has not supported depending on binary packages, only on libraries.
In the past, crate_universe used to expose extra_workspace_members for declaring binary dependencies to augment the library dependencies established by your Cargo.toml.
Supporting this feature in crate_universe would make it substantially more convenient to manage binary dependencies. In particular, --repin would be able to pull in updates, which is not possible with the current "external manifests" way.
Binary dependencies would be declared in Cargo.toml as follows, and would work with both crates_repository and crates_vendor.
[dependencies]
# Export rust_binary for all bins in the package. If the# package also contains a library, then a rust_library still# needs to be generated in BUILD.example-1.0.0.bazel because# the binary depends on it, but it will be private.example = { version = "1", artifact = "bin" }
# Export rust_binary for those specific bins, do not export rust_library.example = { version = "1", artifact = ["bin:faketty", "bin:cmake"] }
# Export rust_library as well as rust_binary.example = { version = "1", artifact = "bin", lib = true }
# Export rust_library, do not generate any rust_binary targets.example = { version = "1" }
The text was updated successfully, but these errors were encountered:
I just filed a pull request rust-lang/cargo#11550 for cargo metata supporting artifact dependencies. I will appreciate you trying it to see if that meets the needs :)
Historically Cargo has not supported depending on binary packages, only on libraries.
In the past, crate_universe used to expose
extra_workspace_members
for declaring binary dependencies to augment the library dependencies established by your Cargo.toml.This was deleted in #1406 in favor of "external manifests":
Recently though, Cargo has begun implementing support for binary dependencies natively in Cargo.toml.
Supporting this feature in crate_universe would make it substantially more convenient to manage binary dependencies. In particular,
--repin
would be able to pull in updates, which is not possible with the current "external manifests" way.Binary dependencies would be declared in Cargo.toml as follows, and would work with both
crates_repository
andcrates_vendor
.The text was updated successfully, but these errors were encountered: