Cargo.toml
Rama main · réplica de lectura del repositorio original.
[workspace]
resolver = "2"
members = [
"apps/cli",
"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",
] }
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
# opt-level 0 compiles the AVX2 BT.709 kernel into a spill loop. On the
# ci-verify profile that is 180 ms for 1080p against 3 ms for swscale, and
# the Windows real-capture job then keeps about 6 fps. opt-level 1 is under
# 2 ms, still faster than swscale.
[profile.dev.package.cap-enc-ffmpeg]
opt-level = 1
# The verification suite decodes markers from every output pixel it reads;
# unoptimised it spends minutes in its own loops.
[profile.dev.package.cap-verify]
opt-level = 3
# Engine verification suite in CI (.github/workflows/engine-verify.yml).
# Dependencies come from the Rust cache, so optimising them costs nothing on
# a warm run and speeds up the cases; workspace crates rebuild on every run
# and stay cheap to compile. No debuginfo or incremental state to cache.
[profile.ci-verify]
inherits = "dev"
debug = 0
incremental = false
[profile.ci-verify.package."*"]
opt-level = 1
# `package."*"` does not cover workspace members, so this crate otherwise
# stays at opt-level 0. See `[profile.dev.package.cap-enc-ffmpeg]`.
[profile.ci-verify.package.cap-enc-ffmpeg]
opt-level = 1
[profile.ci-verify.package.cap-verify]
opt-level = 3
# 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" }
# https://github.com/CapSoftware/reqwest/commit/9b5ecbd5210a9510fde766015cabb724c1e70d2e
reqwest = { git = "https://github.com/CapSoftware/reqwest", rev = "9b5ecbd5210a9510fde766015cabb724c1e70d2e" }