- Upgrade workspace pyo3 0.24 → 0.25 and numpy 0.24 → 0.25 for Python 3.14 support - rtx-sklearn-py: replace pinned pyo3 0.20 / pyo3-asyncio 0.20 / numpy 0.20 with workspace versions; remove broken pyo3-asyncio async feature; update pyo3-build-config to 0.24 - rtx-bindings: uncomment pyo3/numpy/ndarray optional deps; enable python feature in Cargo.toml - Migrate rtx-bindings python/ to PyO3 0.25 Bound API: &PyAny → Bound<'py, PyAny>, downcast/extract on Bound types, remove rtx_runtime import, remove InferenceError arm (variant not in enum), fix py_shape_to_shape signature - Migrate rtx-sklearn-py src/ to PyO3 0.25 Bound API: #[pymodule] fn now takes &Bound<'_, PyModule>, &PyDict → &Bound<'py, PyDict>, from_array returns Bound (unbind instead of to_owned), PyTuple::new now fallible, use numpy::ndarray (0.16) over workspace ndarray (0.15) to resolve trait mismatches Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
71 lines
1.4 KiB
TOML
71 lines
1.4 KiB
TOML
[package]
|
|
name = "rtx-bindings"
|
|
version = "1.0.0"
|
|
edition.workspace = true
|
|
rust-version = "1.92"
|
|
authors.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
description = "Language bindings and SDK for RustyTorch++"
|
|
|
|
[lib]
|
|
name = "rtx_bindings"
|
|
crate-type = ["cdylib", "rlib"]
|
|
|
|
[dependencies]
|
|
rtx-tensor = { workspace = true }
|
|
rtx-autograd = { workspace = true }
|
|
|
|
# Python bindings with PyO3
|
|
pyo3 = { workspace = true, optional = true }
|
|
numpy = { workspace = true, optional = true }
|
|
ndarray = { workspace = true, optional = true }
|
|
|
|
# C API support
|
|
libc = { version = "0.2", optional = true }
|
|
|
|
# Serialization for ONNX/DLPack
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true, optional = true }
|
|
|
|
# Async runtime
|
|
tokio = { workspace = true }
|
|
|
|
# Error handling
|
|
thiserror = { workspace = true }
|
|
anyhow = { workspace = true }
|
|
|
|
# Logging
|
|
tracing = { workspace = true }
|
|
tracing-subscriber = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
tokio-test = { workspace = true }
|
|
|
|
[[test]]
|
|
name = "python_bindings"
|
|
path = "tests/python_bindings.rs"
|
|
|
|
[[test]]
|
|
name = "c_api"
|
|
path = "tests/c_api.rs"
|
|
|
|
[[test]]
|
|
name = "onnx_interop"
|
|
path = "tests/onnx_interop.rs"
|
|
|
|
[[test]]
|
|
name = "dlpack_interop"
|
|
path = "tests/dlpack_interop.rs"
|
|
|
|
[features]
|
|
default = ["c-api"]
|
|
python = ["dep:pyo3", "dep:numpy", "dep:ndarray"]
|
|
c-api = ["dep:libc"]
|
|
onnx = ["dep:serde_json"]
|
|
dlpack = []
|
|
|
|
|
|
[lints]
|
|
workspace = true
|