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

Add documentation about multiple Cargo targets error #3

Closed
volks73 opened this issue Nov 29, 2020 · 1 comment
Closed

Add documentation about multiple Cargo targets error #3

volks73 opened this issue Nov 29, 2020 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@volks73
Copy link
Owner

volks73 commented Nov 29, 2020

An error will occur if a Cargo project has multiple targets, i.e. library and one or more binaries defined in the package's manifest (Cargo.toml). Please note, "target" here is not the compiler target but the Cargo target. In this situation, the with_args must be used and the --lib or --bin <NAME> flag or option, respectively, must be added. Otherwise, an error message appears with the cargo rustc command that a single Cargo target must be called in order to pass rustc arguments.

@volks73 volks73 added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 29, 2020
@volks73 volks73 self-assigned this Nov 29, 2020
@volks73
Copy link
Owner Author

volks73 commented Nov 30, 2020

This has been addressed with the new CargoRustcPrintCfg builder type and defaulting to adding the --lib flag. This avoids issues with multiple targets but if the user would like the compiler configuration for a specific Cargo target, the CargoRustcPrintCfg::cargo_target method is available in v0.2.0.

@volks73 volks73 closed this as completed Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant