We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
metadata.packages
metadata.resolve
An artifact = "bin" dependency that doesn't specifiy lib = true will not appear in the packages or resolve properties of cargo metadata
artifact = "bin"
lib = true
packages
resolve
cargo metadata
It is listed in the dependencies of the dependant package
dependencies
cargo new binary cargo new --lib library echo 'binary = { path = "../binary", artifact = "bin" }' >> library/Cargo.toml cargo +nightly metadata -Zbindeps --manifest-path=library/Cargo.toml
Gives
{ "packages": [ { "name": "library", "version": "0.1.0", "id": "library 0.1.0 (path+file:///.../library)", "license": null, "license_file": null, "description": null, "source": null, "dependencies": [ { "name": "binary", "source": null, "req": "*", "kind": null, "rename": null, "optional": false, "uses_default_features": true, "features": [], "artifact": { "kinds": [ "bin" ], "lib": false, "target": null }, "target": null, "registry": null, "path": "...\\binary" } ], "targets": [ { "kind": [ "lib" ], "crate_types": [ "lib" ], "name": "library", "src_path": "...\\library\\src\\lib.rs", "edition": "2021", "doc": true, "doctest": true, "test": true } ], "features": {}, "manifest_path": "...\\library\\Cargo.toml", "metadata": null, "publish": null, "authors": [], "categories": [], "keywords": [], "readme": null, "repository": null, "homepage": null, "documentation": null, "edition": "2021", "links": null, "default_run": null, "rust_version": null } ], "workspace_members": [ "library 0.1.0 (path+file:///.../library)" ], "resolve": { "nodes": [ { "id": "library 0.1.0 (path+file:///.../library)", "dependencies": [], "deps": [], "features": [] } ], "root": "library 0.1.0 (path+file:///.../library)" }, "target_directory": "...\\library\\target", "version": 1, "workspace_root": "...\\library", "metadata": null }
No response
cargo 1.62.0-nightly (edffc4ada 2022-04-19) release: 1.62.0-nightly commit-hash: edffc4ada3d77799e5a04eeafd9b2f843d29fc23 commit-date: 2022-04-19 host: x86_64-pc-windows-msvc libgit2: 1.4.2 (sys:0.14.2 vendored) libcurl: 7.80.0-DEV (sys:0.4.51+curl-7.80.0 vendored ssl:Schannel) os: Windows 10.0.19044 (Windows 10 Pro) [64-bit]
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Problem
An
artifact = "bin"
dependency that doesn't specifiylib = true
will not appear in thepackages
orresolve
properties ofcargo metadata
It is listed in the
dependencies
of the dependant packageSteps
Gives
Possible Solution(s)
No response
Notes
No response
Version
The text was updated successfully, but these errors were encountered: