mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-28 13:02:21 +01:00
Copy Scrawl's `crates/capture` from kitlangton/scrawl, branch `engine/split`, commit e351ddb28be47c77481cb6821cc72d7f8fe7c769 (e351ddb), without history, keeping the package name `scrawl-capture`, and its `docs/app-handover-spec.md` as `docs/plans/capture-handover-spec.md`. Hex depends on it by path instead of the Git pin at 86d7d6c; the Nix `outputHashes."scrawl-capture-0.3.13"` entry goes. Workspace: `crates/capture` is in `[workspace] exclude`, so `cargo build`, `cargo test`, and `--workspace` never build it (Linux, Windows, and Nix included). It compiles only as the `capture` feature's macOS dependency, sharing the root Cargo.lock and target/. The root package stays a member without being listed, since listing "." defeats `exclude`. On macOS `scripts/check` and the macOS workflow name it (`-p voice-control -p scrawl-capture --features capture`) to lint and test its 257 tests. API adaptations in capture_host: - `Finished` gains `gaps` and `missing_transcript`; the host records them and `hex capture status` (human and JSON `last`) shows them. - `Engine::new` bridges the crate's log to `Host::log` when no sink is set, so Hex's own `TracingLog` sink goes and each line is logged once. - Scrawl now writes its bundle files 0600; Hex still tightens recording.mp4, the window log, and folders. - Nothing on Hex's path reads ~/.config/scrawl or writes under Application Support/scrawl: the crate does that only after `enable_scrawl_host_defaults`/`enable_file_log`, which Hex never calls. Scrubbed (synthetic values): a file:///Users/<name> path in ax.rs, the com.kitlangton.UpDown / dev.kitlangton.UpDown test bundle IDs in handoff.rs and phone.rs (now com.example.UpDown), and a personal device name in a phone.rs test. Kept: Scrawl's own product IDs (dev.kitlangton.scrawl, .helper) and its public GitHub releases URL. fmt and clippy -D warnings, no behaviour change: `cargo fmt` on five files; `chunks_exact(N)` to `as_chunks::<N>()` (19 sites); collapsed `if let` chains in capture/macos.rs and pipeline.rs and a `match` in page.rs; `type` aliases for a drag start and two ingest hooks; explicit lower bounds on two test `match` range arms in keyframes.rs; `slice::from_ref` for two one-element slices; `and_then` for `map().flatten()`; a dropped `to_owned`; `#[allow]` for one `too_many_arguments` and one `single_range_in_vec_init`.
88 lines
2.3 KiB
TOML
88 lines
2.3 KiB
TOML
[package]
|
|
name = "scrawl-capture"
|
|
version = "0.3.13"
|
|
edition = "2024"
|
|
license = "MIT"
|
|
publish = false
|
|
|
|
[features]
|
|
default = ["screen", "helper"]
|
|
screen = []
|
|
helper = []
|
|
input = []
|
|
mic = ["dep:cpal"]
|
|
phone = ["helper"]
|
|
hex-client = []
|
|
cli = []
|
|
|
|
[dependencies]
|
|
anyhow = "1.0.104"
|
|
cpal = { version = "0.18.2", optional = true }
|
|
dirs = "7.0.0"
|
|
flume = "0.12.0"
|
|
hound = "3.5.1"
|
|
libc = "0.2.189"
|
|
png = "0.18.1"
|
|
scrawl-router = { path = "../router" }
|
|
serde = { version = "1.0.229", features = ["derive"] }
|
|
serde_json = "1.0.151"
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
block2 = "0.6.2"
|
|
core-foundation = "0.10.0"
|
|
core-graphics = "0.24.0"
|
|
core-graphics-types = "0.1.3"
|
|
core-text = "21.0.0"
|
|
objc2 = "0.6.4"
|
|
objc2-app-kit = { version = "0.3.2", features = ["NSPasteboard", "NSPasteboardItem"] }
|
|
objc2-core-foundation = "0.3.2"
|
|
objc2-foundation = { version = "0.3.2", features = ["NSArray", "NSData", "NSString"] }
|
|
screencapturekit = { version = "=11.0.0", features = ["macos_15_0"] }
|
|
|
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
ab_glyph = "0.2.32"
|
|
windows = { version = "0.61.3", features = [
|
|
"Wdk_System_SystemServices",
|
|
"Win32_System_SystemInformation",
|
|
"Win32_System_LibraryLoader",
|
|
"Foundation",
|
|
"Graphics_Capture",
|
|
"Graphics_DirectX",
|
|
"Graphics_DirectX_Direct3D11",
|
|
"Win32_Foundation",
|
|
"Win32_Graphics_Direct3D",
|
|
"Win32_Graphics_Direct3D11",
|
|
"Win32_Graphics_Dwm",
|
|
"Win32_Graphics_Dxgi",
|
|
"Win32_Graphics_Dxgi_Common",
|
|
"Win32_Graphics_Gdi",
|
|
"Win32_Media_MediaFoundation",
|
|
"Win32_NetworkManagement_IpHelper",
|
|
"Win32_Networking_WinSock",
|
|
"Win32_Security",
|
|
"Win32_Security_Cryptography",
|
|
"Win32_Storage_FileSystem",
|
|
"Win32_Storage_Xps",
|
|
"Win32_System_Com",
|
|
"Win32_System_Console",
|
|
"Win32_System_Com_StructuredStorage",
|
|
"Win32_System_DataExchange",
|
|
"Win32_System_Diagnostics_Debug",
|
|
"Win32_System_Kernel",
|
|
"Win32_System_Memory",
|
|
"Win32_System_Ole",
|
|
"Win32_System_Performance",
|
|
"Win32_System_ProcessStatus",
|
|
"Win32_System_Registry",
|
|
"Win32_System_Threading",
|
|
"Win32_System_Variant",
|
|
"Win32_System_WinRT",
|
|
"Win32_System_WinRT_Direct3D11",
|
|
"Win32_System_WinRT_Graphics_Capture",
|
|
"Win32_UI_Accessibility",
|
|
"Win32_UI_HiDpi",
|
|
"Win32_UI_Input_KeyboardAndMouse",
|
|
"Win32_UI_Shell",
|
|
"Win32_UI_Shell_Common",
|
|
"Win32_UI_WindowsAndMessaging",
|
|
] }
|