[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