{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/pyproject/_shared/latest--maturin.json",
  "title": "ToolMaturin",
  "description": "The `[tool.maturin]` section of a pyproject.toml",
  "x-lintel": {
    "source": "https://json.schemastore.org/maturin.json",
    "sourceSha256": "f3dc83f6e70ec0648c418a539fcfa2f96ce52e5fe4d5ee285b5d57f6868d942b"
  },
  "type": "object",
  "properties": {
    "all-features": {
      "description": "Activate all available features",
      "type": [
        "boolean",
        "null"
      ]
    },
    "auditwheel": {
      "description": "Audit wheel mode",
      "anyOf": [
        {
          "$ref": "#/$defs/AuditWheelMode"
        },
        {
          "type": "null"
        }
      ]
    },
    "bindings": {
      "description": "Bindings type",
      "type": [
        "string",
        "null"
      ]
    },
    "compatibility": {
      "description": "Platform compatibility",
      "anyOf": [
        {
          "$ref": "#/$defs/PlatformTag"
        },
        {
          "type": "null"
        }
      ]
    },
    "config": {
      "description": "Override a configuration value (unstable)",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "data": {
      "description": "Path to the wheel directory, defaults to `<module_name>.data`",
      "type": [
        "string",
        "null"
      ]
    },
    "exclude": {
      "description": "Exclude files matching the given glob pattern(s)",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/GlobPattern"
      }
    },
    "features": {
      "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": {
        "$ref": "#/$defs/FeatureSpec"
      }
    },
    "frozen": {
      "description": "Require Cargo.lock and cache are up to date",
      "type": [
        "boolean",
        "null"
      ]
    },
    "include": {
      "description": "Include files matching the given glob pattern(s)",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/GlobPattern"
      }
    },
    "locked": {
      "description": "Require Cargo.lock is up to date",
      "type": [
        "boolean",
        "null"
      ]
    },
    "manifest-path": {
      "description": "Path to Cargo.toml",
      "type": [
        "string",
        "null"
      ]
    },
    "module-name": {
      "description": "Module name, accepts setuptools style import name like `foo.bar`",
      "type": [
        "string",
        "null"
      ]
    },
    "no-default-features": {
      "description": "Do not activate the `default` feature",
      "type": [
        "boolean",
        "null"
      ]
    },
    "profile": {
      "description": "Build artifacts with the specified Cargo profile",
      "type": [
        "string",
        "null"
      ]
    },
    "python-packages": {
      "description": "Python packages to include",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "python-source": {
      "description": "The directory with python module, contains `<module_name>/__init__.py`",
      "type": [
        "string",
        "null"
      ]
    },
    "rustc-args": {
      "description": "Additional rustc arguments",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "sdist-generator": {
      "description": "Source distribution generator",
      "default": "cargo",
      "allOf": [
        {
          "$ref": "#/$defs/SdistGenerator"
        }
      ]
    },
    "skip-auditwheel": {
      "description": "Skip audit wheel",
      "default": false,
      "type": "boolean"
    },
    "strip": {
      "description": "Strip the final binary",
      "default": false,
      "type": "boolean"
    },
    "target": {
      "description": "Target configuration",
      "default": {},
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/TargetConfig"
      }
    },
    "targets": {
      "description": "Cargo compile targets",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/CargoTarget"
      }
    },
    "unstable-flags": {
      "description": "Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    }
  },
  "x-tombi-table-keys-order": "schema",
  "$defs": {
    "AuditWheelMode": {
      "description": "Auditwheel mode",
      "oneOf": [
        {
          "description": "Audit and repair wheel for manylinux compliance",
          "type": "string",
          "enum": [
            "repair"
          ]
        },
        {
          "description": "Check wheel for manylinux compliance, but do not repair",
          "type": "string",
          "enum": [
            "check"
          ]
        },
        {
          "description": "Don't check for manylinux compliance",
          "type": "string",
          "enum": [
            "skip"
          ]
        }
      ]
    },
    "CargoCrateType": {
      "description": "Supported cargo crate types",
      "oneOf": [
        {
          "description": "Binary executable target",
          "type": "string",
          "enum": [
            "bin"
          ]
        },
        {
          "description": "Dynamic system library target",
          "type": "string",
          "enum": [
            "cdylib"
          ]
        },
        {
          "description": "Dynamic Rust library target",
          "type": "string",
          "enum": [
            "dylib"
          ]
        },
        {
          "description": "Rust library",
          "type": "string",
          "enum": [
            "lib"
          ]
        },
        {
          "description": "Rust library for use as an intermediate target",
          "type": "string",
          "enum": [
            "rlib"
          ]
        },
        {
          "description": "Static library",
          "type": "string",
          "enum": [
            "staticlib"
          ]
        }
      ]
    },
    "CargoTarget": {
      "description": "Cargo compile target",
      "type": "object",
      "required": [
        "name"
      ],
      "x-tombi-table-keys-order": "schema",
      "properties": {
        "kind": {
          "description": "Kind of target (\"bin\", \"cdylib\")",
          "anyOf": [
            {
              "$ref": "#/$defs/CargoCrateType"
            },
            {
              "type": "null"
            }
          ]
        },
        "name": {
          "description": "Name as given in the `Cargo.toml` or generated from the file name",
          "type": "string"
        }
      }
    },
    "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": [
        {
          "description": "Source distribution",
          "type": "string",
          "enum": [
            "sdist"
          ]
        },
        {
          "description": "Wheel",
          "type": "string",
          "enum": [
            "wheel"
          ]
        }
      ]
    },
    "Formats": {
      "description": "A single [Format] or multiple [Format] values for a [GlobPattern].",
      "anyOf": [
        {
          "description": "A single [Format] value",
          "allOf": [
            {
              "$ref": "#/$defs/Format"
            }
          ]
        },
        {
          "description": "Multiple [Format] values",
          "type": "array",
          "items": {
            "$ref": "#/$defs/Format"
          }
        }
      ]
    },
    "GlobPattern": {
      "description": "A glob pattern for the include and exclude configuration.\n\nSee [PyProjectToml::include] and [PyProject::exclude].\n\nBased on <https://python-poetry.org/docs/pyproject/#include-and-exclude>.",
      "anyOf": [
        {
          "description": "A glob",
          "type": "string"
        },
        {
          "description": "A glob `path` with a `format` key to specify one or more [Format] values",
          "type": "object",
          "required": [
            "format",
            "path"
          ],
          "x-tombi-table-keys-order": "schema",
          "properties": {
            "format": {
              "description": "One or more [Format] values",
              "allOf": [
                {
                  "$ref": "#/$defs/Formats"
                }
              ]
            },
            "path": {
              "description": "A glob",
              "type": "string"
            }
          }
        }
      ]
    },
    "PlatformTag": {
      "description": "Decides how to handle manylinux and musllinux compliance",
      "oneOf": [
        {
          "description": "Use the manylinux_x_y tag",
          "type": "object",
          "required": [
            "Manylinux"
          ],
          "x-tombi-table-keys-order": "schema",
          "properties": {
            "Manylinux": {
              "type": "object",
              "required": [
                "x",
                "y"
              ],
              "x-tombi-table-keys-order": "schema",
              "properties": {
                "x": {
                  "description": "GLIBC version major",
                  "type": "integer",
                  "format": "uint16",
                  "minimum": 0.0
                },
                "y": {
                  "description": "GLIBC version minor",
                  "type": "integer",
                  "format": "uint16",
                  "minimum": 0.0
                }
              }
            }
          },
          "additionalProperties": false
        },
        {
          "description": "Use the musllinux_x_y tag",
          "type": "object",
          "required": [
            "Musllinux"
          ],
          "x-tombi-table-keys-order": "schema",
          "properties": {
            "Musllinux": {
              "type": "object",
              "required": [
                "x",
                "y"
              ],
              "x-tombi-table-keys-order": "schema",
              "properties": {
                "x": {
                  "description": "musl libc version major",
                  "type": "integer",
                  "format": "uint16",
                  "minimum": 0.0
                },
                "y": {
                  "description": "musl libc version minor",
                  "type": "integer",
                  "format": "uint16",
                  "minimum": 0.0
                }
              }
            }
          },
          "additionalProperties": false
        },
        {
          "description": "Use the native linux tag",
          "type": "string",
          "enum": [
            "Linux"
          ]
        }
      ]
    },
    "SdistGenerator": {
      "description": "Source distribution generator",
      "oneOf": [
        {
          "description": "Use `cargo package --list`",
          "type": "string",
          "enum": [
            "cargo"
          ]
        },
        {
          "description": "Use `git ls-files`",
          "type": "string",
          "enum": [
            "git"
          ]
        }
      ]
    },
    "TargetConfig": {
      "description": "Target configuration",
      "type": "object",
      "x-tombi-table-keys-order": "schema",
      "properties": {
        "macos-deployment-target": {
          "description": "macOS deployment target version",
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}
