Skip to content
Merged
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
28 changes: 26 additions & 2 deletions src/schemas/json/maturin.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@
}
},
"features": {
"description": "Space or comma separated list of features to activate",
"description": "List of features to activate.\nEach entry can be a plain feature name string, or a conditional object\nwith `feature` and `python-version` keys.",
"type": ["array", "null"],
"items": {
"type": "string"
"$ref": "#/definitions/FeatureSpec"
}
},
"frozen": {
Expand Down Expand Up @@ -231,6 +231,30 @@
}
}
},
"FeatureSpec": {
"description": "A cargo feature specification that can be either a plain feature name\nor a conditional feature that is only enabled for certain Python versions.\n\n# Examples\n\n```toml\n[tool.maturin]\nfeatures = [\n \"some-feature\",\n { feature = \"pyo3/abi3-py311\", python-version = \">=3.11\" },\n { feature = \"pyo3/abi3-py38\", python-version = \"<3.11\" },\n]\n```",
"anyOf": [
{
"description": "A plain feature name, always enabled",
"type": "string"
},
{
"description": "A feature enabled only when the target Python version matches",
"type": "object",
"properties": {
"feature": {
"description": "The cargo feature to enable",
"type": "string"
},
"python-version": {
"description": "PEP 440 version specifier for the target Python version, e.g. \">=3.11\"",
"type": "string"
}
},
"required": ["feature", "python-version"]
}
]
},
"Format": {
"description": "The target format for the include or exclude [GlobPattern].\n\nSee [Formats].",
"oneOf": [
Expand Down