71 lines
1.7 KiB
Plaintext
71 lines
1.7 KiB
Plaintext
[package]
|
|
name = "rtx-bindings"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
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 = { path = "../rtx-tensor" }
|
|
rtx-autograd = { path = "../rtx-autograd" }
|
|
rtx-runtime = { path = "../rtx-runtime" }
|
|
rtx-inference = { path = "../rtx-inference" }
|
|
|
|
# Python bindings with PyO3
|
|
pyo3 = { version = "0.20", features = ["extension-module", "abi3", "abi3-py38"], optional = true }
|
|
pyo3-asyncio = { version = "0.20", features = ["tokio-runtime"], optional = true }
|
|
numpy = { version = "0.20", optional = true }
|
|
ndarray = { version = "0.15", optional = true }
|
|
|
|
# C API support
|
|
libc = { version = "0.2", optional = true }
|
|
|
|
# Serialization for ONNX/DLPack
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
serde_json = { version = "1.0", optional = true }
|
|
onnx = { version = "0.1.0", optional = true }
|
|
|
|
# Async runtime
|
|
tokio = { version = "1.0", features = ["full"] }
|
|
|
|
# Error handling
|
|
thiserror = "1.0"
|
|
anyhow = "1.0"
|
|
|
|
[dev-dependencies]
|
|
pyo3 = { version = "0.20", features = ["auto-initialize"] }
|
|
tokio-test = "0.4"
|
|
|
|
[build-dependencies]
|
|
pyo3-build-config = "0.20"
|
|
|
|
[[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 = ["python", "c-api", "onnx", "dlpack"]
|
|
python = ["dep:pyo3", "dep:pyo3-asyncio", "dep:numpy", "dep:ndarray"]
|
|
c-api = ["dep:libc"]
|
|
onnx = ["dep:onnx", "dep:serde_json"]
|
|
dlpack = []
|
|
extension-module = ["pyo3?/extension-module"]
|