Skip to content

Conversation

jahs-tech
Copy link
Contributor

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:
image

@jahs-tech
Copy link
Contributor Author

r? @emilio

@pvdrz pvdrz merged commit 2d99bbd into rust-lang:main Feb 16, 2023
@jahs-tech jahs-tech deleted the jah23q1-add-build-deps-warning branch February 18, 2023 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants