Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 18 additions & 11 deletions docs/maintainers/manifest-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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"
]
Expand Down Expand Up @@ -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": {
Expand Down
14 changes: 14 additions & 0 deletions docs/users/manifests.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
```

<a id="host"></a>

#### `"host"` Field
Expand Down