-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
180 lines (173 loc) · 8.04 KB
/
Copy pathCargo.toml
File metadata and controls
180 lines (173 loc) · 8.04 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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
[workspace]
members = ["crates/*"]
resolver = "3"
[workspace.package]
version = "0.6.4"
edition = "2024"
rust-version = "1.88"
license = "AGPL-3.0-or-later"
repository = "https://github.com/utof/perima"
[workspace.lints.rust]
missing_docs = "deny"
unsafe_code = "deny"
missing_debug_implementations = "warn"
unreachable_pub = "warn"
[workspace.lints.rustdoc]
broken_intra_doc_links = "deny"
private_intra_doc_links = "deny"
[workspace.lints.clippy]
pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
cognitive_complexity = "warn"
too_many_lines = "warn"
excessive_nesting = "warn"
module_name_repetitions = "allow"
# WHY allow: `doc_markdown` demands backticks around any mixed-case token it
# mistakes for an identifier — "OpenAI", "JavaScript", "GitHub", product names,
# vendor names. It fires constantly on ordinary English prose in doc comments,
# every fire is a pure-churn edit with no correctness value, and clippy's
# default `doc-valid-idents` allowlist can't keep up with the proper nouns this
# codebase actually uses. Real doc-quality enforcement lives in
# `rustdoc::broken_intra_doc_links` (deny) + `missing_docs` (deny), which catch
# links and coverage — the things that actually break readers.
doc_markdown = "allow"
missing_errors_doc = "warn"
# --- Restriction lints (wave 1, 2026-04-20) ---
# Zero fires on HEAD; pure forward-insurance against AI-slop patterns.
# Source: docs/research/rust_strictness.md §1, §6, §8.
dbg_macro = "deny"
todo = "deny"
unimplemented = "deny"
undocumented_unsafe_blocks = "warn"
unwrap_used = "warn"
# Print-macro restrictions (wave 2, 2026-04-20).
# Per-crate allows cover user-facing CLI output; non-CLI crates must not
# println!/eprintln! (use tracing instead).
print_stdout = "warn"
print_stderr = "warn"
[workspace.dependencies]
# WHY workspace-path dep for perima-app: release-plz + downstream shells
# (cli, desktop) need it reachable via `workspace = true` so bumps
# propagate correctly via the workspace graph.
perima-app = { path = "crates/app", version = "0.6.4" }
# WHY workspace-path dep for perima-media: release-plz + other crates
# (perima CLI) need it reachable via `workspace = true` so bumps
# propagate correctly via the workspace graph.
perima-media = { path = "crates/media", version = "0.6.3" }
async-broadcast = "=0.7.2"
async-trait = "=0.1.89"
futures = "0.3"
anyhow = "1"
miette = { version = "7", features = ["fancy"] }
thiserror = "2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tracing = "0.1"
tracing-appender = "0.2"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
tokio = { version = "1", features = ["full"] }
tokio-util = { version = "0.7", features = ["rt"] }
uuid = { version = "1", features = ["v4", "v7", "serde"] }
blake3 = { version = "1", features = ["mmap", "rayon"] }
rusqlite = { version = "0.39", features = ["bundled"] }
refinery = { version = "0.9", features = ["rusqlite"] }
flume = "0.12"
r2d2 = "0.8"
r2d2_sqlite = "0.33"
walkdir = "2"
notify = "8.2"
notify-debouncer-full = "0.7"
sysinfo = "0.38"
directories = "6"
# unicode-normalization: KEPT only for tag NFC normalization in crates/core/src/tag.rs.
# DO NOT use in path code — path equivalence is handled via fs::canonicalize round-trip
# (see crates/core/tests/props_path_nfc_equivalence.rs). Strategy review tracked in
# GH issue #112.
unicode-normalization = "0.1"
dunce = "1"
file-id = "0.2"
tauri = { version = "~2.10", features = ["protocol-asset"] }
tauri-specta = { version = "=2.0.0-rc.24", features = ["derive", "typescript"] }
specta = "=2.0.0-rc.24"
specta-typescript = "0.0.11"
tauri-build = "~2.5"
tauri-plugin-dialog = "~2.7"
clap = { version = "4", features = ["derive"] }
tempfile = "3"
insta = { version = "1", features = ["yaml", "filters"] }
proptest = "1"
assert_cmd = "2"
predicates = "3"
rayon = "1"
ctrlc = { version = "3", features = ["termination"] }
chrono = { version = "0.4", features = ["serde"] }
image = "0.25"
nom-exif = "2.7"
mp4parse = "0.17"
mime_guess = "2"
minijinja = { version = "2", default-features = false, features = ["macros", "loader"] }
# WHY async-openai 0.36 (plan spec'd 0.32; 0.36 is latest stable as of 2026-05):
# The `audio` feature gates the Transcriptions/Speech/Translations API groups;
# default-features disabled to avoid pulling in `assistant` + `batch` + etc.
#
# WHY `rustls` must be listed explicitly: async-openai's `default` feature is
# `["rustls"]`, which forwards to `reqwest/rustls`. Turning defaults off to
# drop the unused API groups ALSO dropped the TLS backend, leaving reqwest
# compiled with no HTTPS support at all — every request to a real provider
# failed at the connector before opening a socket, surfacing as the useless
# `TranscriptionError::Network("error sending request for url (...)")`.
#
# WHY this was invisible to the test suite: the wiremock stubs in
# `crates/transcribe/tests` and `crates/cli/tests` serve plain HTTP on
# 127.0.0.1, which needs no TLS backend. Only a real `https://` provider
# exercises this. See GH #189.
#
# WHY `rustls` and not `native-tls`: matches the upstream default and avoids a
# system OpenSSL dependency across the windows/macos/linux CI matrix and the
# bundled Tauri desktop binary.
async-openai = { version = "0.36", default-features = false, features = ["audio", "rustls"] }
# WHY which 8: cross-platform PATH binary discovery for CliFfmpegInvoker.
which = "8"
# WHY keyring 3.6 (not 4.0): keyring 4.0 removed the compile-time feature flags
# (apple-native, windows-native, linux-native-sync-persistent) in favour of
# runtime `use_native_store()` calls — a breaking API change. The T4 adapter
# slice targets the 3.6 feature-flag API; upgrading to 4.0 is a separate
# migration tracked alongside T4.
keyring = { version = "3.6", features = ["apple-native", "windows-native", "linux-native-sync-persistent"] }
# WHY dialoguer 0.12: interactive CLI prompts; `password` gates the hidden-input
# widget for API key entry.
dialoguer = { version = "0.12", features = ["password"] }
# WHY wiremock 0.6 (plan spec'd 0.7; 0.6.5 is latest stable as of 2026-05, 0.7
# does not exist on crates.io): HTTP mock server for openai-compat tests.
wiremock = "0.6"
# WHY hound 3.5: WAV read/write used by audio fixture helpers in tests.
hound = "3.5"
# WHY regex 1: BCP-47 language-code shape validation in CLI `transcribe --language`.
# Loose validator (RFC 5646 subset); promote to `unic-langid` if/when full
# Unicode-language-tag handling is needed.
regex = "1"
# WHY toml 1 (plan spec'd 0.10; 1.1 is latest stable as of 2026-05): used by
# transcription config loader in the adapters slice.
toml = "1"
# WHY tauri-plugin-shell 2: needed by desktop shell for DesktopFfmpegInvoker
# to locate the bundled sidecar binary path.
tauri-plugin-shell = "2"
# WHY ffmpeg-sidecar 2: workspace dep so desktop crate can reference the
# sidecar binary management helpers without re-pinning.
ffmpeg-sidecar = "2"
[profile.release]
lto = "thin"
codegen-units = 1
# WHY [patch.crates-io] for refinery: rusqlite 0.39 (which bundles SQLite
# 3.51.3, fixing the AB-BA lock-order inversion in unixClose vs unixLock
# documented in GH #131) requires refinery-core to widen its `rusqlite`
# version cap from `<=0.38` to `<=0.39`. The upstream PR
# https://github.com/rust-db/refinery/pull/425 ("chore: Support rusqlite
# 0.39.x") is mergeable + all CI checks green, awaiting maintainer merge.
# Pinning to the PR branch via this patch resolves the libsqlite3-sys
# `links = "sqlite3"` conflict and lets the SQLite version bump land.
# Removal: drop both lines once refinery 0.10 (or whatever ships #425)
# is on crates.io and the workspace dep is bumped to it.
[patch.crates-io]
refinery = { git = "https://github.com/tomasol/refinery", branch = "pr-rusqlite-39" }
refinery-core = { git = "https://github.com/tomasol/refinery", branch = "pr-rusqlite-39" }