[build-system]
requires = ["maturin>=1.0,<2.0"]
build-backend = "maturin"

[project]
name = "pywebnn"
# Version is read from Cargo.toml by maturin
dynamic = ["version"]
description = "EXPERIMENTAL: Python bindings for W3C WebNN API - Neural network graph validation, ONNX/CoreML conversion, and cross-platform execution with CPU/GPU/NPU support"
readme = "README.md"
requires-python = ">=3.11"
license = { text = "Apache-2.0" }
authors = [
    { name = "Tarek Ziade", email = "tarek@ziade.org" }
]
keywords = [
    "webnn",
    "neural-network",
    "machine-learning",
    "onnx",
    "coreml",
    "ai",
    "graph",
    "inference",
]
classifiers = [
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Developers",
    "Intended Audience :: Science/Research",
    "License :: OSI Approved :: Apache Software License",
    "Operating System :: OS Independent",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Programming Language :: Python :: Implementation :: CPython",
    "Programming Language :: Rust",
    "Topic :: Scientific/Engineering :: Artificial Intelligence",
    "Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
    "numpy>=1.20.0",
    "onnxruntime==1.23.2; platform_system == 'Linux'",
]

[project.urls]
Homepage = "https://github.com/tarekziade/rustnn"
Documentation = "https://tarekziade.github.io/rustnn/"
Repository = "https://github.com/tarekziade/rustnn"
Issues = "https://github.com/tarekziade/rustnn/issues"
Changelog = "https://github.com/tarekziade/rustnn/releases"

[project.optional-dependencies]
dev = [
    "pytest>=7.0",
    "pytest-asyncio>=0.21.0",
    "maturin>=1.0",
]

[tool.maturin]
features = ["python"]
module-name = "webnn._rustnn"
python-source = "python"

[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_python_api.py"]
addopts = "-v"
