#compdef maturin

autoload -U is-at-least

_maturin() {
    typeset -A opt_args
    typeset -a _arguments_options
    local ret=1

    if is-at-least 5.2; then
        _arguments_options=(-s -S -C)
    else
        _arguments_options=(-s -C)
    fi

    local context curcontext="$curcontext" state line
    _arguments "${_arguments_options[@]}" : \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
":: :_maturin_commands" \
"*::: :->maturin" \
&& ret=0
    case $state in
    (maturin)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:maturin-command-$line[1]:"
        case $line[1] in
            (build)
_arguments "${_arguments_options[@]}" : \
'*--compatibility=[Control the platform tag and PyPI compatibility]' \
'*-i+[The python versions to build wheels for, given as the executables of interpreters such as \`python3.9\` or \`/usr/bin/python3.8\`]' \
'*--interpreter=[The python versions to build wheels for, given as the executables of interpreters such as \`python3.9\` or \`/usr/bin/python3.8\`]' \
'-b+[Which kind of bindings to use]:BINDINGS:(pyo3 pyo3-ffi cffi uniffi bin)' \
'--bindings=[Which kind of bindings to use]:BINDINGS:(pyo3 pyo3-ffi cffi uniffi bin)' \
'-o+[The directory to store the built wheels in. Defaults to a new "wheels" directory in the project'\''s target directory]:OUT:_files' \
'--out=[The directory to store the built wheels in. Defaults to a new "wheels" directory in the project'\''s target directory]:OUT:_files' \
'(--skip-auditwheel)--auditwheel=[Audit wheel for manylinux compliance]:AUDITWHEEL:((repair\:"Audit and repair wheel for manylinux compliance"
check\:"Check wheel for manylinux compliance, but do not repair"
skip\:"Don'\''t check for manylinux compliance"))' \
'-j+[Number of parallel jobs, defaults to # of CPUs]:N:_default' \
'--jobs=[Number of parallel jobs, defaults to # of CPUs]:N:_default' \
'--profile=[Build artifacts with the specified Cargo profile]:PROFILE-NAME:_default' \
'*-F+[Space or comma separated list of features to activate]:FEATURES:_default' \
'*--features=[Space or comma separated list of features to activate]:FEATURES:_default' \
'--target=[Build for the target triple]:TRIPLE:_default' \
'--target-dir=[Directory for all generated artifacts]:DIRECTORY:_files' \
'-m+[Path to Cargo.toml]:PATH:_files' \
'--manifest-path=[Path to Cargo.toml]:PATH:_files' \
'--color=[Coloring\: auto, always, never]:WHEN:_default' \
'*--config=[Override a configuration value (unstable)]:KEY=VALUE:_default' \
'*-Z+[Unstable (nightly-only) flags to Cargo, see '\''cargo -Z help'\'' for details]:FLAG:_default' \
'*--timings=[Timing output formats (unstable) (comma separated)\: html, json]:FMTS:_default' \
'--compression-method=[Zip compression method. Only Stored and Deflated are currently compatible with all package managers]:COMPRESSION_METHOD:((deflated\:"Deflate compression (levels 0-9, default 6)"
stored\:"No compression"
bzip2\:"BZIP2 compression (levels 0-9, default 6)"
zstd\:"Zstandard compression (supported from Python 3.14; levels -7-22, default 3)"))' \
'--compression-level=[Zip compression level. Defaults to method default]:COMPRESSION_LEVEL:_default' \
'(--profile)-r[Build artifacts in release mode, with optimizations]' \
'(--profile)--release[Build artifacts in release mode, with optimizations]' \
'--strip[Strip the library for minimum file size]' \
'--sdist[Build a source distribution]' \
'(-i --interpreter)-f[Find interpreters from the host machine]' \
'(-i --interpreter)--find-interpreter[Find interpreters from the host machine]' \
'--skip-auditwheel[Don'\''t check for manylinux compliance]' \
'--zig[For manylinux targets, use zig to ensure compliance for the chosen manylinux version]' \
'-q[Do not print cargo log messages]' \
'--quiet[Do not print cargo log messages]' \
'--all-features[Activate all available features]' \
'--no-default-features[Do not activate the \`default\` feature]' \
'--ignore-rust-version[Ignore \`rust-version\` specification in packages]' \
'*-v[Use verbose output (-vv very verbose/build.rs output)]' \
'*--verbose[Use verbose output (-vv very verbose/build.rs output)]' \
'--frozen[Require Cargo.lock and cache are up to date]' \
'--locked[Require Cargo.lock is up to date]' \
'--offline[Run without accessing the network]' \
'--future-incompat-report[Outputs a future incompatibility report at the end of the build (unstable)]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::args -- Rustc flags:_default' \
&& ret=0
;;
(publish)
_arguments "${_arguments_options[@]}" : \
'-r+[The repository (package index) to upload the package to. Should be a section in the config file]:REPOSITORY:_default' \
'--repository=[The repository (package index) to upload the package to. Should be a section in the config file]:REPOSITORY:_default' \
'--repository-url=[The URL of the registry where the wheels are uploaded to. This overrides --repository]:REPOSITORY_URL:_default' \
'-u+[Username for pypi or your custom registry]:USERNAME:_default' \
'--username=[Username for pypi or your custom registry]:USERNAME:_default' \
'-p+[Password for pypi or your custom registry]:PASSWORD:_default' \
'--password=[Password for pypi or your custom registry]:PASSWORD:_default' \
'*--compatibility=[Control the platform tag and PyPI compatibility]' \
'*-i+[The python versions to build wheels for, given as the executables of interpreters such as \`python3.9\` or \`/usr/bin/python3.8\`]' \
'*--interpreter=[The python versions to build wheels for, given as the executables of interpreters such as \`python3.9\` or \`/usr/bin/python3.8\`]' \
'-b+[Which kind of bindings to use]:BINDINGS:(pyo3 pyo3-ffi cffi uniffi bin)' \
'--bindings=[Which kind of bindings to use]:BINDINGS:(pyo3 pyo3-ffi cffi uniffi bin)' \
'-o+[The directory to store the built wheels in. Defaults to a new "wheels" directory in the project'\''s target directory]:OUT:_files' \
'--out=[The directory to store the built wheels in. Defaults to a new "wheels" directory in the project'\''s target directory]:OUT:_files' \
'(--skip-auditwheel)--auditwheel=[Audit wheel for manylinux compliance]:AUDITWHEEL:((repair\:"Audit and repair wheel for manylinux compliance"
check\:"Check wheel for manylinux compliance, but do not repair"
skip\:"Don'\''t check for manylinux compliance"))' \
'-j+[Number of parallel jobs, defaults to # of CPUs]:N:_default' \
'--jobs=[Number of parallel jobs, defaults to # of CPUs]:N:_default' \
'--profile=[Build artifacts with the specified Cargo profile]:PROFILE-NAME:_default' \
'*-F+[Space or comma separated list of features to activate]:FEATURES:_default' \
'*--features=[Space or comma separated list of features to activate]:FEATURES:_default' \
'--target=[Build for the target triple]:TRIPLE:_default' \
'--target-dir=[Directory for all generated artifacts]:DIRECTORY:_files' \
'-m+[Path to Cargo.toml]:PATH:_files' \
'--manifest-path=[Path to Cargo.toml]:PATH:_files' \
'--color=[Coloring\: auto, always, never]:WHEN:_default' \
'*--config=[Override a configuration value (unstable)]:KEY=VALUE:_default' \
'*-Z+[Unstable (nightly-only) flags to Cargo, see '\''cargo -Z help'\'' for details]:FLAG:_default' \
'*--timings=[Timing output formats (unstable) (comma separated)\: html, json]:FMTS:_default' \
'--compression-method=[Zip compression method. Only Stored and Deflated are currently compatible with all package managers]:COMPRESSION_METHOD:((deflated\:"Deflate compression (levels 0-9, default 6)"
stored\:"No compression"
bzip2\:"BZIP2 compression (levels 0-9, default 6)"
zstd\:"Zstandard compression (supported from Python 3.14; levels -7-22, default 3)"))' \
'--compression-level=[Zip compression level. Defaults to method default]:COMPRESSION_LEVEL:_default' \
'(--profile)--debug[Do not pass --release to cargo]' \
'--no-strip[Do not strip the library for minimum file size]' \
'--no-sdist[Don'\''t build a source distribution]' \
'--skip-existing[Continue uploading files if one already exists. (Only valid when uploading to PyPI. Other implementations may not support this.)]' \
'--non-interactive[Do not interactively prompt for username/password if the required credentials are missing]' \
'(-i --interpreter)-f[Find interpreters from the host machine]' \
'(-i --interpreter)--find-interpreter[Find interpreters from the host machine]' \
'--skip-auditwheel[Don'\''t check for manylinux compliance]' \
'--zig[For manylinux targets, use zig to ensure compliance for the chosen manylinux version]' \
'-q[Do not print cargo log messages]' \
'--quiet[Do not print cargo log messages]' \
'--all-features[Activate all available features]' \
'--no-default-features[Do not activate the \`default\` feature]' \
'--ignore-rust-version[Ignore \`rust-version\` specification in packages]' \
'*-v[Use verbose output (-vv very verbose/build.rs output)]' \
'*--verbose[Use verbose output (-vv very verbose/build.rs output)]' \
'--frozen[Require Cargo.lock and cache are up to date]' \
'--locked[Require Cargo.lock is up to date]' \
'--offline[Run without accessing the network]' \
'--future-incompat-report[Outputs a future incompatibility report at the end of the build (unstable)]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::args -- Rustc flags:_default' \
&& ret=0
;;
(list-python)
_arguments "${_arguments_options[@]}" : \
'--target=[]:TARGET:_default' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(develop)
_arguments "${_arguments_options[@]}" : \
'-b+[Which kind of bindings to use]:BINDINGS:(pyo3 pyo3-ffi cffi uniffi bin)' \
'--bindings=[Which kind of bindings to use]:BINDINGS:(pyo3 pyo3-ffi cffi uniffi bin)' \
'*-E+[Install extra requires aka. optional dependencies]:EXTRAS:_default' \
'*--extras=[Install extra requires aka. optional dependencies]:EXTRAS:_default' \
'--pip-path=[Use a specific pip installation instead of the default one]:PIP_PATH:_files' \
'-j+[Number of parallel jobs, defaults to # of CPUs]:N:_default' \
'--jobs=[Number of parallel jobs, defaults to # of CPUs]:N:_default' \
'--profile=[Build artifacts with the specified Cargo profile]:PROFILE-NAME:_default' \
'*-F+[Space or comma separated list of features to activate]:FEATURES:_default' \
'*--features=[Space or comma separated list of features to activate]:FEATURES:_default' \
'--target=[Build for the target triple]:TRIPLE:_default' \
'--target-dir=[Directory for all generated artifacts]:DIRECTORY:_files' \
'-m+[Path to Cargo.toml]:PATH:_files' \
'--manifest-path=[Path to Cargo.toml]:PATH:_files' \
'--color=[Coloring\: auto, always, never]:WHEN:_default' \
'*--config=[Override a configuration value (unstable)]:KEY=VALUE:_default' \
'*-Z+[Unstable (nightly-only) flags to Cargo, see '\''cargo -Z help'\'' for details]:FLAG:_default' \
'*--timings=[Timing output formats (unstable) (comma separated)\: html, json]:FMTS:_default' \
'--compression-method=[Zip compression method. Only Stored and Deflated are currently compatible with all package managers]:COMPRESSION_METHOD:((deflated\:"Deflate compression (levels 0-9, default 6)"
stored\:"No compression"
bzip2\:"BZIP2 compression (levels 0-9, default 6)"
zstd\:"Zstandard compression (supported from Python 3.14; levels -7-22, default 3)"))' \
'--compression-level=[Zip compression level. Defaults to method default]:COMPRESSION_LEVEL:_default' \
'(--profile)-r[Pass --release to cargo]' \
'(--profile)--release[Pass --release to cargo]' \
'--strip[Strip the library for minimum file size]' \
'--skip-install[Skip installation, only build the extension module inplace]' \
'-q[Do not print cargo log messages]' \
'--quiet[Do not print cargo log messages]' \
'--all-features[Activate all available features]' \
'--no-default-features[Do not activate the \`default\` feature]' \
'--ignore-rust-version[Ignore \`rust-version\` specification in packages]' \
'*-v[Use verbose output (-vv very verbose/build.rs output)]' \
'*--verbose[Use verbose output (-vv very verbose/build.rs output)]' \
'--frozen[Require Cargo.lock and cache are up to date]' \
'--locked[Require Cargo.lock is up to date]' \
'--offline[Run without accessing the network]' \
'--future-incompat-report[Outputs a future incompatibility report at the end of the build (unstable)]' \
'--uv[Use \`uv\` to install packages instead of \`pip\`]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::args -- Rustc flags:_default' \
&& ret=0
;;
(sdist)
_arguments "${_arguments_options[@]}" : \
'-m+[The path to the Cargo.toml]:MANIFEST_PATH:_files' \
'--manifest-path=[The path to the Cargo.toml]:MANIFEST_PATH:_files' \
'-o+[The directory to store the built wheels in. Defaults to a new "wheels" directory in the project'\''s target directory]:OUT:_files' \
'--out=[The directory to store the built wheels in. Defaults to a new "wheels" directory in the project'\''s target directory]:OUT:_files' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(init)
_arguments "${_arguments_options[@]}" : \
'--name=[Set the resulting package name, defaults to the directory name]:NAME:_default' \
'-b+[Which kind of bindings to use]:BINDINGS:(pyo3 cffi uniffi bin)' \
'--bindings=[Which kind of bindings to use]:BINDINGS:(pyo3 cffi uniffi bin)' \
'--mixed[Use mixed Rust/Python project layout]' \
'--src[Use Python first src layout for mixed Rust/Python project]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'::path -- Project path:_default' \
&& ret=0
;;
(new)
_arguments "${_arguments_options[@]}" : \
'--name=[Set the resulting package name, defaults to the directory name]:NAME:_default' \
'-b+[Which kind of bindings to use]:BINDINGS:(pyo3 cffi uniffi bin)' \
'--bindings=[Which kind of bindings to use]:BINDINGS:(pyo3 cffi uniffi bin)' \
'--mixed[Use mixed Rust/Python project layout]' \
'--src[Use Python first src layout for mixed Rust/Python project]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':path -- Project path:_default' \
&& ret=0
;;
(generate-ci)
_arguments "${_arguments_options[@]}" : \
'-m+[Path to Cargo.toml]:PATH:_files' \
'--manifest-path=[Path to Cargo.toml]:PATH:_files' \
'-o+[Output path]:PATH:_files' \
'--output=[Output path]:PATH:_files' \
'*--platform=[Platform support]:platform:((all\:"All"
manylinux\:"Manylinux"
musllinux\:"Musllinux"
windows\:"Windows"
macos\:"macOS"
emscripten\:"Emscripten"))' \
'--pytest[Enable pytest]' \
'--zig[Use zig to do cross compilation]' \
'--skip-attestation[Skip artifact attestation]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':ci -- CI provider:((github\:"GitHub"))' \
&& ret=0
;;
(upload)
_arguments "${_arguments_options[@]}" : \
'-r+[The repository (package index) to upload the package to. Should be a section in the config file]:REPOSITORY:_default' \
'--repository=[The repository (package index) to upload the package to. Should be a section in the config file]:REPOSITORY:_default' \
'--repository-url=[The URL of the registry where the wheels are uploaded to. This overrides --repository]:REPOSITORY_URL:_default' \
'-u+[Username for pypi or your custom registry]:USERNAME:_default' \
'--username=[Username for pypi or your custom registry]:USERNAME:_default' \
'-p+[Password for pypi or your custom registry]:PASSWORD:_default' \
'--password=[Password for pypi or your custom registry]:PASSWORD:_default' \
'--skip-existing[Continue uploading files if one already exists. (Only valid when uploading to PyPI. Other implementations may not support this.)]' \
'--non-interactive[Do not interactively prompt for username/password if the required credentials are missing]' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::files -- The python packages to upload:_files' \
&& ret=0
;;
(pep517)
_arguments "${_arguments_options[@]}" : \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
":: :_maturin__pep517_commands" \
"*::: :->pep517" \
&& ret=0

    case $state in
    (pep517)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:maturin-pep517-command-$line[1]:"
        case $line[1] in
            (write-dist-info)
_arguments "${_arguments_options[@]}" : \
'*--compatibility=[Control the platform tag and PyPI compatibility]' \
'*-i+[The python versions to build wheels for, given as the executables of interpreters such as \`python3.9\` or \`/usr/bin/python3.8\`]' \
'*--interpreter=[The python versions to build wheels for, given as the executables of interpreters such as \`python3.9\` or \`/usr/bin/python3.8\`]' \
'-b+[Which kind of bindings to use]:BINDINGS:(pyo3 pyo3-ffi cffi uniffi bin)' \
'--bindings=[Which kind of bindings to use]:BINDINGS:(pyo3 pyo3-ffi cffi uniffi bin)' \
'-o+[The directory to store the built wheels in. Defaults to a new "wheels" directory in the project'\''s target directory]:OUT:_files' \
'--out=[The directory to store the built wheels in. Defaults to a new "wheels" directory in the project'\''s target directory]:OUT:_files' \
'(--skip-auditwheel)--auditwheel=[Audit wheel for manylinux compliance]:AUDITWHEEL:((repair\:"Audit and repair wheel for manylinux compliance"
check\:"Check wheel for manylinux compliance, but do not repair"
skip\:"Don'\''t check for manylinux compliance"))' \
'-j+[Number of parallel jobs, defaults to # of CPUs]:N:_default' \
'--jobs=[Number of parallel jobs, defaults to # of CPUs]:N:_default' \
'--profile=[Build artifacts with the specified Cargo profile]:PROFILE-NAME:_default' \
'*-F+[Space or comma separated list of features to activate]:FEATURES:_default' \
'*--features=[Space or comma separated list of features to activate]:FEATURES:_default' \
'--target=[Build for the target triple]:TRIPLE:_default' \
'--target-dir=[Directory for all generated artifacts]:DIRECTORY:_files' \
'-m+[Path to Cargo.toml]:PATH:_files' \
'--manifest-path=[Path to Cargo.toml]:PATH:_files' \
'--color=[Coloring\: auto, always, never]:WHEN:_default' \
'*--config=[Override a configuration value (unstable)]:KEY=VALUE:_default' \
'*-Z+[Unstable (nightly-only) flags to Cargo, see '\''cargo -Z help'\'' for details]:FLAG:_default' \
'*--timings=[Timing output formats (unstable) (comma separated)\: html, json]:FMTS:_default' \
'--compression-method=[Zip compression method. Only Stored and Deflated are currently compatible with all package managers]:COMPRESSION_METHOD:((deflated\:"Deflate compression (levels 0-9, default 6)"
stored\:"No compression"
bzip2\:"BZIP2 compression (levels 0-9, default 6)"
zstd\:"Zstandard compression (supported from Python 3.14; levels -7-22, default 3)"))' \
'--compression-level=[Zip compression level. Defaults to method default]:COMPRESSION_LEVEL:_default' \
'--metadata-directory=[The metadata_directory argument to prepare_metadata_for_build_wheel]:METADATA_DIRECTORY:_files' \
'(-i --interpreter)-f[Find interpreters from the host machine]' \
'(-i --interpreter)--find-interpreter[Find interpreters from the host machine]' \
'--skip-auditwheel[Don'\''t check for manylinux compliance]' \
'--zig[For manylinux targets, use zig to ensure compliance for the chosen manylinux version]' \
'-q[Do not print cargo log messages]' \
'--quiet[Do not print cargo log messages]' \
'--all-features[Activate all available features]' \
'--no-default-features[Do not activate the \`default\` feature]' \
'--ignore-rust-version[Ignore \`rust-version\` specification in packages]' \
'*-v[Use verbose output (-vv very verbose/build.rs output)]' \
'*--verbose[Use verbose output (-vv very verbose/build.rs output)]' \
'--frozen[Require Cargo.lock and cache are up to date]' \
'--locked[Require Cargo.lock is up to date]' \
'--offline[Run without accessing the network]' \
'--future-incompat-report[Outputs a future incompatibility report at the end of the build (unstable)]' \
'--strip[Strip the library for minimum file size]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::args -- Rustc flags:_default' \
&& ret=0
;;
(build-wheel)
_arguments "${_arguments_options[@]}" : \
'*--compatibility=[Control the platform tag and PyPI compatibility]' \
'*-i+[The python versions to build wheels for, given as the executables of interpreters such as \`python3.9\` or \`/usr/bin/python3.8\`]' \
'*--interpreter=[The python versions to build wheels for, given as the executables of interpreters such as \`python3.9\` or \`/usr/bin/python3.8\`]' \
'-b+[Which kind of bindings to use]:BINDINGS:(pyo3 pyo3-ffi cffi uniffi bin)' \
'--bindings=[Which kind of bindings to use]:BINDINGS:(pyo3 pyo3-ffi cffi uniffi bin)' \
'-o+[The directory to store the built wheels in. Defaults to a new "wheels" directory in the project'\''s target directory]:OUT:_files' \
'--out=[The directory to store the built wheels in. Defaults to a new "wheels" directory in the project'\''s target directory]:OUT:_files' \
'(--skip-auditwheel)--auditwheel=[Audit wheel for manylinux compliance]:AUDITWHEEL:((repair\:"Audit and repair wheel for manylinux compliance"
check\:"Check wheel for manylinux compliance, but do not repair"
skip\:"Don'\''t check for manylinux compliance"))' \
'-j+[Number of parallel jobs, defaults to # of CPUs]:N:_default' \
'--jobs=[Number of parallel jobs, defaults to # of CPUs]:N:_default' \
'--profile=[Build artifacts with the specified Cargo profile]:PROFILE-NAME:_default' \
'*-F+[Space or comma separated list of features to activate]:FEATURES:_default' \
'*--features=[Space or comma separated list of features to activate]:FEATURES:_default' \
'--target=[Build for the target triple]:TRIPLE:_default' \
'--target-dir=[Directory for all generated artifacts]:DIRECTORY:_files' \
'-m+[Path to Cargo.toml]:PATH:_files' \
'--manifest-path=[Path to Cargo.toml]:PATH:_files' \
'--color=[Coloring\: auto, always, never]:WHEN:_default' \
'*--config=[Override a configuration value (unstable)]:KEY=VALUE:_default' \
'*-Z+[Unstable (nightly-only) flags to Cargo, see '\''cargo -Z help'\'' for details]:FLAG:_default' \
'*--timings=[Timing output formats (unstable) (comma separated)\: html, json]:FMTS:_default' \
'--compression-method=[Zip compression method. Only Stored and Deflated are currently compatible with all package managers]:COMPRESSION_METHOD:((deflated\:"Deflate compression (levels 0-9, default 6)"
stored\:"No compression"
bzip2\:"BZIP2 compression (levels 0-9, default 6)"
zstd\:"Zstandard compression (supported from Python 3.14; levels -7-22, default 3)"))' \
'--compression-level=[Zip compression level. Defaults to method default]:COMPRESSION_LEVEL:_default' \
'(-i --interpreter)-f[Find interpreters from the host machine]' \
'(-i --interpreter)--find-interpreter[Find interpreters from the host machine]' \
'--skip-auditwheel[Don'\''t check for manylinux compliance]' \
'--zig[For manylinux targets, use zig to ensure compliance for the chosen manylinux version]' \
'-q[Do not print cargo log messages]' \
'--quiet[Do not print cargo log messages]' \
'--all-features[Activate all available features]' \
'--no-default-features[Do not activate the \`default\` feature]' \
'--ignore-rust-version[Ignore \`rust-version\` specification in packages]' \
'*-v[Use verbose output (-vv very verbose/build.rs output)]' \
'*--verbose[Use verbose output (-vv very verbose/build.rs output)]' \
'--frozen[Require Cargo.lock and cache are up to date]' \
'--locked[Require Cargo.lock is up to date]' \
'--offline[Run without accessing the network]' \
'--future-incompat-report[Outputs a future incompatibility report at the end of the build (unstable)]' \
'--strip[Strip the library for minimum file size]' \
'--editable[Build editable wheels]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::args -- Rustc flags:_default' \
&& ret=0
;;
(write-sdist)
_arguments "${_arguments_options[@]}" : \
'--sdist-directory=[The sdist_directory argument to build_sdist]:SDIST_DIRECTORY:_files' \
'-m+[The path to the Cargo.toml]:PATH:_files' \
'--manifest-path=[The path to the Cargo.toml]:PATH:_files' \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_maturin__pep517__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:maturin-pep517-help-command-$line[1]:"
        case $line[1] in
            (write-dist-info)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(build-wheel)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(write-sdist)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(completions)
_arguments "${_arguments_options[@]}" : \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':shell:(bash elvish fish nushell powershell zsh)' \
&& ret=0
;;
(zig)
_arguments "${_arguments_options[@]}" : \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
":: :_maturin__zig_commands" \
"*::: :->zig" \
&& ret=0

    case $state in
    (zig)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:maturin-zig-command-$line[1]:"
        case $line[1] in
            (cc)
_arguments "${_arguments_options[@]}" : \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::args -- `zig cc` arguments:_default' \
&& ret=0
;;
(c++)
_arguments "${_arguments_options[@]}" : \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::args -- `zig c++` arguments:_default' \
&& ret=0
;;
(ar)
_arguments "${_arguments_options[@]}" : \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::args -- `zig ar` arguments:_default' \
&& ret=0
;;
(ranlib)
_arguments "${_arguments_options[@]}" : \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::args -- `zig ranlib` arguments:_default' \
&& ret=0
;;
(lib)
_arguments "${_arguments_options[@]}" : \
'*-v[Use verbose output]' \
'*--verbose[Use verbose output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::args -- `zig lib` arguments:_default' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_maturin__zig__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:maturin-zig-help-command-$line[1]:"
        case $line[1] in
            (cc)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(c++)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(ar)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(ranlib)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(lib)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_maturin__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:maturin-help-command-$line[1]:"
        case $line[1] in
            (build)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(publish)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list-python)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(develop)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(sdist)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(init)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(new)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(generate-ci)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(upload)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(pep517)
_arguments "${_arguments_options[@]}" : \
":: :_maturin__help__pep517_commands" \
"*::: :->pep517" \
&& ret=0

    case $state in
    (pep517)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:maturin-help-pep517-command-$line[1]:"
        case $line[1] in
            (write-dist-info)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(build-wheel)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(write-sdist)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(completions)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(zig)
_arguments "${_arguments_options[@]}" : \
":: :_maturin__help__zig_commands" \
"*::: :->zig" \
&& ret=0

    case $state in
    (zig)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:maturin-help-zig-command-$line[1]:"
        case $line[1] in
            (cc)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(c++)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(ar)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(ranlib)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(lib)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
}

(( $+functions[_maturin_commands] )) ||
_maturin_commands() {
    local commands; commands=(
'build:Build the crate into python packages' \
'publish:Build and publish the crate as python packages to pypi' \
'list-python:Search and list the available python installations' \
'develop:Install the crate as module in the current virtualenv' \
'sdist:Build only a source distribution (sdist) without compiling' \
'init:Create a new cargo project in an existing directory' \
'new:Create a new cargo project' \
'generate-ci:Generate CI configuration' \
'upload:Upload python packages to pypi' \
'pep517:Backend for the PEP 517 integration. Not for human consumption' \
'completions:Generate shell completions' \
'zig:Zig linker wrapper' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'maturin commands' commands "$@"
}
(( $+functions[_maturin__build_commands] )) ||
_maturin__build_commands() {
    local commands; commands=()
    _describe -t commands 'maturin build commands' commands "$@"
}
(( $+functions[_maturin__completions_commands] )) ||
_maturin__completions_commands() {
    local commands; commands=()
    _describe -t commands 'maturin completions commands' commands "$@"
}
(( $+functions[_maturin__develop_commands] )) ||
_maturin__develop_commands() {
    local commands; commands=()
    _describe -t commands 'maturin develop commands' commands "$@"
}
(( $+functions[_maturin__generate-ci_commands] )) ||
_maturin__generate-ci_commands() {
    local commands; commands=()
    _describe -t commands 'maturin generate-ci commands' commands "$@"
}
(( $+functions[_maturin__help_commands] )) ||
_maturin__help_commands() {
    local commands; commands=(
'build:Build the crate into python packages' \
'publish:Build and publish the crate as python packages to pypi' \
'list-python:Search and list the available python installations' \
'develop:Install the crate as module in the current virtualenv' \
'sdist:Build only a source distribution (sdist) without compiling' \
'init:Create a new cargo project in an existing directory' \
'new:Create a new cargo project' \
'generate-ci:Generate CI configuration' \
'upload:Upload python packages to pypi' \
'pep517:Backend for the PEP 517 integration. Not for human consumption' \
'completions:Generate shell completions' \
'zig:Zig linker wrapper' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'maturin help commands' commands "$@"
}
(( $+functions[_maturin__help__build_commands] )) ||
_maturin__help__build_commands() {
    local commands; commands=()
    _describe -t commands 'maturin help build commands' commands "$@"
}
(( $+functions[_maturin__help__completions_commands] )) ||
_maturin__help__completions_commands() {
    local commands; commands=()
    _describe -t commands 'maturin help completions commands' commands "$@"
}
(( $+functions[_maturin__help__develop_commands] )) ||
_maturin__help__develop_commands() {
    local commands; commands=()
    _describe -t commands 'maturin help develop commands' commands "$@"
}
(( $+functions[_maturin__help__generate-ci_commands] )) ||
_maturin__help__generate-ci_commands() {
    local commands; commands=()
    _describe -t commands 'maturin help generate-ci commands' commands "$@"
}
(( $+functions[_maturin__help__help_commands] )) ||
_maturin__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'maturin help help commands' commands "$@"
}
(( $+functions[_maturin__help__init_commands] )) ||
_maturin__help__init_commands() {
    local commands; commands=()
    _describe -t commands 'maturin help init commands' commands "$@"
}
(( $+functions[_maturin__help__list-python_commands] )) ||
_maturin__help__list-python_commands() {
    local commands; commands=()
    _describe -t commands 'maturin help list-python commands' commands "$@"
}
(( $+functions[_maturin__help__new_commands] )) ||
_maturin__help__new_commands() {
    local commands; commands=()
    _describe -t commands 'maturin help new commands' commands "$@"
}
(( $+functions[_maturin__help__pep517_commands] )) ||
_maturin__help__pep517_commands() {
    local commands; commands=(
'write-dist-info:The implementation of prepare_metadata_for_build_wheel' \
'build-wheel:Implementation of build_wheel' \
'write-sdist:The implementation of build_sdist' \
    )
    _describe -t commands 'maturin help pep517 commands' commands "$@"
}
(( $+functions[_maturin__help__pep517__build-wheel_commands] )) ||
_maturin__help__pep517__build-wheel_commands() {
    local commands; commands=()
    _describe -t commands 'maturin help pep517 build-wheel commands' commands "$@"
}
(( $+functions[_maturin__help__pep517__write-dist-info_commands] )) ||
_maturin__help__pep517__write-dist-info_commands() {
    local commands; commands=()
    _describe -t commands 'maturin help pep517 write-dist-info commands' commands "$@"
}
(( $+functions[_maturin__help__pep517__write-sdist_commands] )) ||
_maturin__help__pep517__write-sdist_commands() {
    local commands; commands=()
    _describe -t commands 'maturin help pep517 write-sdist commands' commands "$@"
}
(( $+functions[_maturin__help__publish_commands] )) ||
_maturin__help__publish_commands() {
    local commands; commands=()
    _describe -t commands 'maturin help publish commands' commands "$@"
}
(( $+functions[_maturin__help__sdist_commands] )) ||
_maturin__help__sdist_commands() {
    local commands; commands=()
    _describe -t commands 'maturin help sdist commands' commands "$@"
}
(( $+functions[_maturin__help__upload_commands] )) ||
_maturin__help__upload_commands() {
    local commands; commands=()
    _describe -t commands 'maturin help upload commands' commands "$@"
}
(( $+functions[_maturin__help__zig_commands] )) ||
_maturin__help__zig_commands() {
    local commands; commands=(
'cc:\`zig cc\` wrapper' \
'c++:\`zig c++\` wrapper' \
'ar:\`zig ar\` wrapper' \
'ranlib:\`zig ranlib\` wrapper' \
'lib:\`zig lib\` wrapper' \
    )
    _describe -t commands 'maturin help zig commands' commands "$@"
}
(( $+functions[_maturin__help__zig__ar_commands] )) ||
_maturin__help__zig__ar_commands() {
    local commands; commands=()
    _describe -t commands 'maturin help zig ar commands' commands "$@"
}
(( $+functions[_maturin__help__zig__c++_commands] )) ||
_maturin__help__zig__c++_commands() {
    local commands; commands=()
    _describe -t commands 'maturin help zig c++ commands' commands "$@"
}
(( $+functions[_maturin__help__zig__cc_commands] )) ||
_maturin__help__zig__cc_commands() {
    local commands; commands=()
    _describe -t commands 'maturin help zig cc commands' commands "$@"
}
(( $+functions[_maturin__help__zig__lib_commands] )) ||
_maturin__help__zig__lib_commands() {
    local commands; commands=()
    _describe -t commands 'maturin help zig lib commands' commands "$@"
}
(( $+functions[_maturin__help__zig__ranlib_commands] )) ||
_maturin__help__zig__ranlib_commands() {
    local commands; commands=()
    _describe -t commands 'maturin help zig ranlib commands' commands "$@"
}
(( $+functions[_maturin__init_commands] )) ||
_maturin__init_commands() {
    local commands; commands=()
    _describe -t commands 'maturin init commands' commands "$@"
}
(( $+functions[_maturin__list-python_commands] )) ||
_maturin__list-python_commands() {
    local commands; commands=()
    _describe -t commands 'maturin list-python commands' commands "$@"
}
(( $+functions[_maturin__new_commands] )) ||
_maturin__new_commands() {
    local commands; commands=()
    _describe -t commands 'maturin new commands' commands "$@"
}
(( $+functions[_maturin__pep517_commands] )) ||
_maturin__pep517_commands() {
    local commands; commands=(
'write-dist-info:The implementation of prepare_metadata_for_build_wheel' \
'build-wheel:Implementation of build_wheel' \
'write-sdist:The implementation of build_sdist' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'maturin pep517 commands' commands "$@"
}
(( $+functions[_maturin__pep517__build-wheel_commands] )) ||
_maturin__pep517__build-wheel_commands() {
    local commands; commands=()
    _describe -t commands 'maturin pep517 build-wheel commands' commands "$@"
}
(( $+functions[_maturin__pep517__help_commands] )) ||
_maturin__pep517__help_commands() {
    local commands; commands=(
'write-dist-info:The implementation of prepare_metadata_for_build_wheel' \
'build-wheel:Implementation of build_wheel' \
'write-sdist:The implementation of build_sdist' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'maturin pep517 help commands' commands "$@"
}
(( $+functions[_maturin__pep517__help__build-wheel_commands] )) ||
_maturin__pep517__help__build-wheel_commands() {
    local commands; commands=()
    _describe -t commands 'maturin pep517 help build-wheel commands' commands "$@"
}
(( $+functions[_maturin__pep517__help__help_commands] )) ||
_maturin__pep517__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'maturin pep517 help help commands' commands "$@"
}
(( $+functions[_maturin__pep517__help__write-dist-info_commands] )) ||
_maturin__pep517__help__write-dist-info_commands() {
    local commands; commands=()
    _describe -t commands 'maturin pep517 help write-dist-info commands' commands "$@"
}
(( $+functions[_maturin__pep517__help__write-sdist_commands] )) ||
_maturin__pep517__help__write-sdist_commands() {
    local commands; commands=()
    _describe -t commands 'maturin pep517 help write-sdist commands' commands "$@"
}
(( $+functions[_maturin__pep517__write-dist-info_commands] )) ||
_maturin__pep517__write-dist-info_commands() {
    local commands; commands=()
    _describe -t commands 'maturin pep517 write-dist-info commands' commands "$@"
}
(( $+functions[_maturin__pep517__write-sdist_commands] )) ||
_maturin__pep517__write-sdist_commands() {
    local commands; commands=()
    _describe -t commands 'maturin pep517 write-sdist commands' commands "$@"
}
(( $+functions[_maturin__publish_commands] )) ||
_maturin__publish_commands() {
    local commands; commands=()
    _describe -t commands 'maturin publish commands' commands "$@"
}
(( $+functions[_maturin__sdist_commands] )) ||
_maturin__sdist_commands() {
    local commands; commands=()
    _describe -t commands 'maturin sdist commands' commands "$@"
}
(( $+functions[_maturin__upload_commands] )) ||
_maturin__upload_commands() {
    local commands; commands=()
    _describe -t commands 'maturin upload commands' commands "$@"
}
(( $+functions[_maturin__zig_commands] )) ||
_maturin__zig_commands() {
    local commands; commands=(
'cc:\`zig cc\` wrapper' \
'c++:\`zig c++\` wrapper' \
'ar:\`zig ar\` wrapper' \
'ranlib:\`zig ranlib\` wrapper' \
'lib:\`zig lib\` wrapper' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'maturin zig commands' commands "$@"
}
(( $+functions[_maturin__zig__ar_commands] )) ||
_maturin__zig__ar_commands() {
    local commands; commands=()
    _describe -t commands 'maturin zig ar commands' commands "$@"
}
(( $+functions[_maturin__zig__c++_commands] )) ||
_maturin__zig__c++_commands() {
    local commands; commands=()
    _describe -t commands 'maturin zig c++ commands' commands "$@"
}
(( $+functions[_maturin__zig__cc_commands] )) ||
_maturin__zig__cc_commands() {
    local commands; commands=()
    _describe -t commands 'maturin zig cc commands' commands "$@"
}
(( $+functions[_maturin__zig__help_commands] )) ||
_maturin__zig__help_commands() {
    local commands; commands=(
'cc:\`zig cc\` wrapper' \
'c++:\`zig c++\` wrapper' \
'ar:\`zig ar\` wrapper' \
'ranlib:\`zig ranlib\` wrapper' \
'lib:\`zig lib\` wrapper' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'maturin zig help commands' commands "$@"
}
(( $+functions[_maturin__zig__help__ar_commands] )) ||
_maturin__zig__help__ar_commands() {
    local commands; commands=()
    _describe -t commands 'maturin zig help ar commands' commands "$@"
}
(( $+functions[_maturin__zig__help__c++_commands] )) ||
_maturin__zig__help__c++_commands() {
    local commands; commands=()
    _describe -t commands 'maturin zig help c++ commands' commands "$@"
}
(( $+functions[_maturin__zig__help__cc_commands] )) ||
_maturin__zig__help__cc_commands() {
    local commands; commands=()
    _describe -t commands 'maturin zig help cc commands' commands "$@"
}
(( $+functions[_maturin__zig__help__help_commands] )) ||
_maturin__zig__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'maturin zig help help commands' commands "$@"
}
(( $+functions[_maturin__zig__help__lib_commands] )) ||
_maturin__zig__help__lib_commands() {
    local commands; commands=()
    _describe -t commands 'maturin zig help lib commands' commands "$@"
}
(( $+functions[_maturin__zig__help__ranlib_commands] )) ||
_maturin__zig__help__ranlib_commands() {
    local commands; commands=()
    _describe -t commands 'maturin zig help ranlib commands' commands "$@"
}
(( $+functions[_maturin__zig__lib_commands] )) ||
_maturin__zig__lib_commands() {
    local commands; commands=()
    _describe -t commands 'maturin zig lib commands' commands "$@"
}
(( $+functions[_maturin__zig__ranlib_commands] )) ||
_maturin__zig__ranlib_commands() {
    local commands; commands=()
    _describe -t commands 'maturin zig ranlib commands' commands "$@"
}

if [ "$funcstack[1]" = "_maturin" ]; then
    _maturin "$@"
else
    compdef _maturin maturin
fi
