-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathCargo.toml
More file actions
145 lines (131 loc) · 4.5 KB
/
Copy pathCargo.toml
File metadata and controls
145 lines (131 loc) · 4.5 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
[workspace]
resolver = "2"
members = [
"apps/cli",
"apps/desktop/src-tauri",
"crates/*",
"crates/workspace-hack",
]
[workspace.dependencies]
anyhow = { version = "1.0.86" }
# This includes a currently-unreleased fix that ensures the audio stream is actually
# stopped and released on drop on macOS, plus zeroing of WASAPI capture
# packets flagged AUDCLNT_BUFFERFLAGS_SILENT (loopback of an idle endpoint
# otherwise surfaces unspecified buffer contents as audio).
cpal = { git = "https://github.com/CapSoftware/cpal", rev = "6013cb5f8bd3" }
ffmpeg = { package = "ffmpeg-next", git = "https://github.com/CapSoftware/rust-ffmpeg", rev = "49db1fede112" }
tokio = { version = "1.39.3", features = [
"macros",
"process",
"fs",
"sync",
"rt",
"rt-multi-thread",
"time",
] }
tauri = { version = "2.5.0", features = ["specta"] }
specta = { version = "=2.0.0-rc.20", features = [
"derive",
"serde_json",
"uuid",
"chrono"
] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
nokhwa = { git = "https://github.com/CapSoftware/nokhwa", rev = "b9c8079e82e2", features = [
"input-native",
"serialize",
] }
nokhwa-bindings-macos = { git = "https://github.com/CapSoftware/nokhwa", rev = "b9c8079e82e2" }
wgpu = { version = "25.0.0", features = ["wgpu-core"] }
wgpu-hal = "25.0.0"
wgpu-core = "25.0.0"
flume = "0.11.0"
thiserror = "1.0"
sentry = { version = "0.42.0", features = [
"anyhow",
"backtrace",
"debug-images",
] }
tracing = "0.1.41"
futures = "0.3.31"
aho-corasick = "1.1.4"
cidre = { git = "https://github.com/CapSoftware/cidre", rev = "bf84b67079a8", features = [
"macos_12_7",
"cv",
"cf",
"cg",
"core_audio",
"sc",
"av",
"blocks",
"async",
"dispatch",
"io_surface",
"mtl",
"vt",
"vn",
], default-features = false }
windows = "0.60.0"
windows-core = "0.60"
windows-sys = "0.59.0"
windows-capture = "1.5.0"
percent-encoding = "2.3.1"
sysinfo = "0.32"
# TODO: Reenable these: https://github.com/CapSoftware/Cap/issues/859
[workspace.lints.rust]
deprecated = "allow"
unexpected_cfgs = "allow"
unused_must_use = "deny"
[workspace.lints.clippy]
dbg_macro = "deny"
let_underscore_future = "deny"
unchecked_duration_subtraction = "deny"
collapsible_if = "deny"
clone_on_copy = "deny"
redundant_closure = "deny"
ptr_arg = "deny"
len_zero = "deny"
let_unit_value = "deny"
unnecessary_lazy_evaluations = "deny"
needless_range_loop = "deny"
manual_clamp = "deny"
[profile.dev]
debug = 1
[profile.dev.package."*"]
debug = 0
[profile.dev.package.cap-camera-effects]
opt-level = 2
[profile.dev.package.cap-audio]
opt-level = 2
# Optimize for smaller binary size
[profile.release]
panic = "unwind"
codegen-units = 1 # Compile crates one after another so the compiler can optimize better
# Thin LTO runs the cross-crate optimisation in parallel across crates. Fat LTO
# serialised the whole program through one thread and one address space, which
# cost ~60 minutes of the Windows release job (18m for the CLI link + 41m for
# the desktop link) and needed the swapfile / pagefile workarounds in
# desktop-release.yml to survive 16GB runners.
lto = "thin"
opt-level = "s" # Optimize for binary size
# Line tables are all Sentry needs to symbolicate the uploaded dSYM / PDB
# (function names + file:line). Full debuginfo multiplied rlib size and link
# memory for variable/type info nothing consumes.
debug = "line-tables-only"
[patch.crates-io]
# screencapturekit = { git = "https://github.com/CapSoftware/screencapturekit-rs", rev = "7ff1e103742e56c8f6c2e940b5e52684ed0bed69" } # branch = "cap-main"
cidre = { git = "https://github.com/CapSoftware/cidre", rev = "bf84b67079a8" }
# https://github.com/gfx-rs/wgpu/pull/7550
# wgpu = { git = "https://github.com/gfx-rs/wgpu", rev = "cd41a6e32a6239b65d1cecbeccde6a43a100914a" }
wgpu-hal = { path = "vendor/wgpu-hal" }
tao = { path = "vendor/tao" }
# https://github.com/CapSoftware/reqwest/commit/9b5ecbd5210a9510fde766015cabb724c1e70d2e
reqwest = { git = "https://github.com/CapSoftware/reqwest", rev = "9b5ecbd5210a9510fde766015cabb724c1e70d2e" }
# tauri-nspanel v2 @ 18ffb9a with ownership fixes: `to_panel()` no longer steals
# tao's NSWindow retain (every repeat call was an over-release), converting the
# same window twice is a no-op, the store forgets destroyed windows, and the
# broken `dealloc` override (NSObject dealloc + jump through a garbage pointer)
# is gone. See vendor/tauri-nspanel/CAP-CHANGES.md.
[patch."https://github.com/ahkohd/tauri-nspanel"]
tauri-nspanel = { path = "vendor/tauri-nspanel" }