Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
56 lines (52 loc) · 2.37 KB
/
Copy pathCargo.toml
File metadata and controls
56 lines (52 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
[package]
name = "transcribe-cpp"
version = "0.4.1"
edition = "2021"
rust-version = "1.74"
description = "Rust bindings for transcribe.cpp, a C/C++ speech-to-text library built on ggml"
license = "MIT"
readme = "README.md"
repository = "https://github.com/handy-computer/transcribe.cpp"
homepage = "https://github.com/handy-computer/transcribe.cpp"
keywords = ["transcription", "speech", "asr", "stt", "ggml"]
categories = ["multimedia::audio", "api-bindings"]
# A unique `links` name so build.rs can re-emit the -sys crate's location
# metadata one more hop (as DEP_TRANSCRIBE_CPP_*) for downstream packaging. No
# native linking happens here — that lives in -sys. See build.rs.
links = "transcribe_cpp"
[lib]
name = "transcribe_cpp"
path = "src/lib.rs"
[features]
# These mirror transcribe-cpp-sys: enabling a backend here just forwards the
# feature to the -sys crate, which forwards it to the CMake build.
default = ["metal"]
metal = ["transcribe-cpp-sys/metal"]
vulkan = ["transcribe-cpp-sys/vulkan"]
cuda = ["transcribe-cpp-sys/cuda"]
rocm = ["transcribe-cpp-sys/rocm"]
openmp = ["transcribe-cpp-sys/openmp"]
# `shared` links a shared libtranscribe; `dynamic-backends` additionally ships
# each compute backend as a runtime-loaded module (and implies `shared`, both
# here so CARGO_FEATURE_SHARED is set for this crate's build.rs rpath gate, and
# via the -sys feature). See notes/rust-dynamic-backends-plan.md.
shared = ["transcribe-cpp-sys/shared"]
dynamic-backends = ["shared", "transcribe-cpp-sys/dynamic-backends"]
# Serialize/Deserialize on the plain-data option and result types (not handles),
# Serialize on Error, and Serialize/Deserialize on its ErrorReport snapshot. No
# native-build impact.
serde = ["dep:serde"]
[dependencies]
# default-features = false so the safe crate's own features are the ONLY control
# surface: without it, sys's `default = ["metal"]` stays active even under
# `transcribe-cpp --no-default-features`, silently re-enabling Metal. The backend
# features below forward explicitly, so the default (`metal`) still reaches sys
# via `metal = ["transcribe-cpp-sys/metal"]`.
transcribe-cpp-sys = { version = "0.4.1", path = "../../..", default-features = false }
thiserror = "2"
log = "0.4"
serde = { version = "1", features = ["derive"], optional = true }
[dev-dependencies]
hound = "3"
postcard = { version = "1", default-features = false, features = ["alloc"] }
serde_json = "1"