Add warning section to build dependency tutorial doc #2413
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Users (such as myself) that have enough experience to know to copy dependencies into the
Cargo.toml
file, but not enough to know that they should not add it under[dependencies]
. Note that searching for the error does point you directly to this thread which has a solution, so not like it's particularly difficult to resolve.I chose this style of block for the warning since it looks alright and by default, neither standard Markdown nor mdbook supports admonishments (though if we really wanted, we could add a preprocessor like mdbook-admonish, but that seems like overkill).
Also added the actual error message both for reference and to boost the likelihood that this will capture search traffic
Finally, there is the question of whether we want to add this at all, or if it just adds noise to the docs. I will defer to reviewers judgement, but I would argue that
bindgen
would be a very common first build-time crate that a dev will encounter when learning Rust, so this is a great opportunity to highlight the distinction and link to the Cargo docs.Included is a screenshot of what this looks like on localhost:
