diff --git a/docs/maintainers/manifest-files.md b/docs/maintainers/manifest-files.md index 036dbb72b20b62..e1427944f34a5b 100644 --- a/docs/maintainers/manifest-files.md +++ b/docs/maintainers/manifest-files.md @@ -196,7 +196,7 @@ those can be specified using the `"features"` field of the dependency object. If the port does not require any features from the dependency, this should be specified with the `"default-features"` fields set to `false`. -Dependencies can also be filtered based on the target triplet to support differing requirements. +Dependencies and features can also be filtered based on the target triplet to support differing requirements. These filters use the same syntax as the `"supports"` field below, and are specified in the `"platform"` field. @@ -208,17 +208,20 @@ and are specified in the `"platform"` field. "name": "curl", "default-features": false, "features": [ - "winssl" - ], - "platform": "windows" + "http2", + { + "name": "winssl", + "platform": "windows" + }, + { + "name": "openssl", + "platform": "!windows" + } + ] }, { - "name": "curl", - "default-features": false, - "features": [ - "openssl" - ], - "platform": "!windows" + "name": "dbghelp", + "platform": "windows" }, "rapidjson" ] @@ -319,7 +322,11 @@ An array of feature names that the library uses by default, if nothing else is s ```json { "default-features": [ - "kinesis" + "kinesis", + { + "name": "dynamodb", + "platform": "!uwp" + } ], "features": { "dynamodb": { diff --git a/docs/users/manifests.md b/docs/users/manifests.md index 96e40b736a5b61..3ae3319ae898b6 100644 --- a/docs/users/manifests.md +++ b/docs/users/manifests.md @@ -189,6 +189,20 @@ Then, you might just ask for: } ``` +You can also request features only for specific platforms: +```json +{ + "name": "ffmpeg", + "default-features": false, + "features": [ + { + "name": "dav1d", + "platform": "!osx" + } + ] +} +``` + #### `"host"` Field