-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCargo.toml
More file actions
149 lines (130 loc) · 5.2 KB
/
Copy pathCargo.toml
File metadata and controls
149 lines (130 loc) · 5.2 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
[package]
name = "franken_whisper"
version = "0.5.0"
edition = "2024"
license-file = "LICENSE"
description = "Agent-first Rust ASR orchestration stack with ffmpeg normalization and frankensqlite-backed persistence"
[features]
default = []
tui = ["dep:ftui"]
gpu-frankentorch = ["dep:ft-api"]
gpu-frankenjax = ["dep:fj-api", "dep:fj-core"]
# Two binaries from the same entry point: the full name and the short `fw`
# alias agents and humans actually type. Listing them explicitly disables the
# implicit package-named bin, so both are declared here.
#
# NOTE: cargo emits `warning: src/main.rs found to be present in multiple build
# targets` — this is EXPECTED and INTENTIONAL (one 518-line entry point, two
# installable names). Do NOT "fix" it by dropping a bin (breaks the `fw`/
# `franken_whisper` dual name that installers + docs rely on) or by refactoring
# main into the lib behind thin per-bin wrappers (a large, CLI-risky change for a
# cosmetic warning). Accept the warning.
[[bin]]
name = "franken_whisper"
path = "src/main.rs"
[[bin]]
name = "fw"
path = "src/main.rs"
[dependencies]
ctrlc = "3.4"
base64 = "0.22.1"
chrono = { version = "0.4.40", features = ["serde"] }
clap = { version = "4.5.31", features = ["derive", "env"] }
crc32fast = "1.4"
flate2 = "1.1.0"
serde = { version = "1.0.218", features = ["derive"] }
serde_json = "1.0.140"
tempfile = "3.17.1"
thiserror = "2.0.12"
uuid = { version = "1.15.1", features = ["serde", "v4"] }
sha2 = "0.10"
which = "7.0.2"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
hound = "3.5.1"
symphonia = { version = "0.5.5", features = ["mp3", "aac", "isomp4", "ogg", "flac", "vorbis", "wav", "pcm"] }
# Persistent-pool data parallelism for the decoder GEMV (mlp/logits): rayon's
# global pool avoids the per-call `std::thread::scope` spawn that forced L9 to
# serialize the per-token mid GEMVs (bd-6qih, L11). Already in the tree via
# ft-kernel-cpu; pinned to the same minor.
rayon = "1.10"
asupersync = { version = "0.3.4", default-features = false }
franken-kernel = "0.3.4"
franken-evidence = "0.3.4"
franken-decision = "0.3.4"
fsqlite = { path = "../frankensqlite/crates/fsqlite" }
fsqlite-types = { path = "../frankensqlite/crates/fsqlite-types" }
# FrankenTorch compute kernels for the in-process native whisper engine
# (rayon-parallel GEMM, softmax, gelu; f16 storage types). These are
# first-party FrankenSuite crates — see the bd-frp7 epic.
ft-kernel-cpu = { path = "../frankentorch/crates/ft-kernel-cpu" }
ft-core = { path = "../frankentorch/crates/ft-core" }
# Direct dep on `half` (same crate ft-core re-exports as `Float16`) for its
# `HalfFloatSliceExt::convert_to_f32_slice` SIMD bulk f16->f32 dequant — the
# `std` feature enables runtime aarch64 `fp16` / x86 `f16c` vector paths used
# by the f16-compute GEMV kernels (nn::gemv_f16). Pinned to ft-core's version.
half = { version = "2.7", features = ["std"] }
ftui = { path = "../frankentui/crates/ftui", default-features = false, features = ["crossterm"], optional = true }
ft-api = { path = "../frankentorch/crates/ft-api", optional = true }
fj-api = { path = "../frankenjax/crates/fj-api", optional = true }
fj-core = { path = "../frankenjax/crates/fj-core", optional = true }
[lints.rust]
unsafe_code = "deny"
[lints.clippy]
# Targeted lint hardening — pedantic/nursery deferred until missing-docs addressed
enum_glob_use = "warn"
explicit_into_iter_loop = "warn"
explicit_iter_loop = "warn"
flat_map_option = "warn"
implicit_clone = "warn"
semicolon_if_nothing_returned = "warn"
unused_self = "warn"
# GPU acceleration on Apple Silicon: the native engine's matmuls auto-offload to
# the Metal tiled-GEMM kernel at runtime when a GPU is present (see
# native_engine::nn). macOS-only and isolated behind ft-kernel-metal's safe API,
# so franken_whisper keeps `#![deny(unsafe_code)]`. Non-macOS targets never see
# this dep and stay on the optimized CPU path.
[target.'cfg(target_os = "macos")'.dependencies]
ft-kernel-metal = { path = "../frankentorch/crates/ft-kernel-metal" }
[dev-dependencies]
criterion = { version = "0.5", features = ["html_reports"] }
# For the f16_gemv_dequant bench to construct `Float16` weights directly.
ft-core = { path = "../frankentorch/crates/ft-core" }
# For the hugepage_gemv_probe (madvise(MADV_HUGEPAGE) A/B on weight streaming).
# Already a transitive dependency; dev-only, does not affect the shipped binary.
libc = "0.2"
[[bench]]
name = "storage_bench"
harness = false
[[bench]]
name = "normalize_bench"
harness = false
[[bench]]
name = "pipeline_bench"
harness = false
[[bench]]
name = "tty_bench"
harness = false
[[bench]]
name = "sync_bench"
harness = false
[[bench]]
name = "native_engine_bench"
harness = false
# Profiling build: full optimization + symbols/frame pointers so samplers
# (samply/Instruments) can attribute frames. Never profile the size-optimized
# `release` profile (opt-level="z", strip=true → useless flames).
[profile.release-perf]
inherits = "release"
opt-level = 3
lto = "thin"
codegen-units = 1
debug = "line-tables-only"
strip = false
panic = "unwind" # deliberate override of release's abort: scoped-thread panics must unwind for clean bench/profiler teardown
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
panic = "abort"
strip = true