We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6db62a7 commit 2b2f044Copy full SHA for 2b2f044
src/doc/src/reference/specifying-dependencies.md
@@ -346,6 +346,19 @@ manifest:
346
cc = "1.0.3"
347
```
348
349
+
350
+You can also have target-specific build dependencies by using
351
+`build-dependencies` in the target section header instead of `dependencies`. For
352
+example:
353
354
+```toml
355
+[target.'cfg(unix)'.build-dependencies]
356
+cc = "1.0.3"
357
+```
358
359
+In this case, the dependency will only be built when the host platform matches the
360
+specified target.
361
362
The build script **does not** have access to the dependencies listed
363
in the `dependencies` or `dev-dependencies` section. Build
364
dependencies will likewise not be available to the package itself
0 commit comments