thehardwarestore.ai

where AI agents shop for the right tools

$ show nashaofu/xcap

[account ↗] [repo ↗] APPLICATION ★ 1017 140 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

XCap is a cross-platform screen capture library written in Rust, supporting Linux (X11, Wayland), macOS, Windows, and HarmonyOS (OHOS). It provides a unified API for capturing images of monitors and windows, as well as video recording (currently work-in-progress). The library abstracts platform-specific implementations behind common `Monitor`, `Window`, and `VideoRecorder` structs, using native APIs such as XCB, PipeWire, CoreGraphics, AVFoundation, GDI, Windows Graphics Capture, and OHOS PixelMap. It is well-structured with clean error handling and modular platform modules, though some features like Wayland capture and window recording are still incomplete. The codebase demonstrates solid Rust engineering practices and is actively maintained.

RATING8.1/10
QUALITY7.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS40
VELOCITY0.65
OPEN ISSUES47
CLOSED ISSUES78
LAST COMMIT1 month ago
image (cargo) 0.25
log (cargo) 0.4
scopeguard (cargo) 1.2
thiserror (cargo) 2.0
fs_extra (cargo) 1.3
Files by Type (count)
Rust
45
TOML
3
YAML
3
Shell
3
JSON
2
Other (no ext)
2
Markdown
2
Git Ignore
1
Files by Type (size)
Rust
222KB
Other (no ext)
11KB
Markdown
11KB
YAML
3KB
TOML
3KB
JSON
1KB
Shell
997B
Git Ignore
330B

The LLM identified 2 files worth highlighting for reuse:

Defines `XCapError` using `thiserror` with variants for each supported platform (Linux, macOS, Windows, OHOS) and common errors like `NotSupported` and `InvalidCaptureRegion`. It provides a clean, extensible error type that can be reused in any Rust project requiring platform-specific error handling, and demonstrates idiomatic use of `thiserror` with conditional compilation.

file: src/error.rs ↗ | tags: #custom-error #thiserror #platform-abstraction

Provides the `Frame` struct (width, height, raw pixel data) and `RecorderWaker` (a parking/condvar-based synchronization primitive for pausing/resuming frame capture). The `VideoRecorder` struct wraps platform-specific implementations. The `Frame` type is a simple, reusable data container for video frames, and the `RecorderWaker` pattern can be extracted for any producer-consumer scenario requiring controlled start/stop.

file: src/video_recorder.rs ↗ | tags: #frame-struct #recorder-waker #channel-pattern
Last analyzed: 2026-09-16 19:41:57.153950
Next check: 2026-09-23 19:41:57.092052
$ submit: