[package] name = "ct2rs" version = "0.9.4" authors = ["Junpei Kawamoto "] categories = ["api-bindings"] documentation = "https://docs.rs/ct2rs" edition = "2021" include = [ "/include", "/src", "/build.rs", "/LICENSE", "/examples", "/CTranslate2/CMakeLists.txt", "/CTranslate2/LICENSE", "/CTranslate2/cmake", "/CTranslate2/cpp", "/CTranslate2/include", "/CTranslate2/python", "/CTranslate2/src", "/CTranslate2/third_party", "!/CTranslate2/**/.*", "!/CTranslate2/**/test", "!/CTranslate2/**/docs", "!/CTranslate2/**/media", ] keywords = ["ctranslate2", "bindings", "llm", "whisper"] license = "MIT" repository = "https://github.com/jkawamoto/ctranslate2-rs" description = "Rust bindings for OpenNMT/CTranslate2" [dependencies] anyhow = "1.0.89" cxx = { version = "1.0.129", features = ["c++17"] } sentencepiece = "0.11.2" tokenizers = "0.20.1" # Dependencies for Whisper model mel_spec = { version = "0.2.7", optional = true } ndarray = { version = "0.15.6", optional = true } serde = { version = "1.0.210", features = ["derive"], optional = true } serde_json = { version = "1.0.128", optional = true } # Dependencies for Hugging Face integration hf-hub = { version = "0.3.2", optional = true } [target.'cfg(windows)'.dependencies] intel-mkl-src = { version = "0.8.1", optional = true, features = ["mkl-static-ilp64-seq"] } [target.'cfg(unix)'.dependencies] intel-mkl-src = { version = "0.8.1", optional = true } [dev-dependencies] clap = { version = "4.5.20", features = ["derive"] } rand = "0.8.5" # Dependencies for Whisper example hound = { version = "3.5.1" } [build-dependencies] cmake = "0.1.51" cxx-build = "1.0.129" walkdir = "2.5.0" [features] default = ["ruy"] whisper = ["dep:mel_spec", "dep:ndarray", "dep:serde", "dep:serde_json"] flash-attention = [] tensor-parallel = [] cuda-dynamic-loading = ["cuda"] hub = ["dep:hf-hub"] # Features to select backends. mkl = ["dep:intel-mkl-src"] openblas = [] ruy = [] accelerate = [] cuda = [] cudnn = ["cuda"] [[example]] name = "bart" [[example]] name = "bloom" [[example]] name = "falcon" [[example]] name = "marian-mt" [[example]] name = "mpt" [[example]] name = "nllb" [[example]] name = "gpt-2" [[example]] name = "gpt-j" [[example]] name = "gpt-neox" [[example]] name = "opt" [[example]] name = "t5" [[example]] name = "stream" [[example]] name = "whisper" [package.metadata.docs.rs] features = ["whisper", "hub"]