Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
wgc - Windows Graphics Capture Wrapper
A simple and ergonomic Rust wrapper for Windows.Graphics.Capture API, enabling screen/window capture on Windows 10/11.
⚠️ Note: This crate is currently under active development and may not yet be feature-complete or stable for production use.
Features
- Easy-to-use iterator interface for capturing frames
- Support for capturing windows, monitors
- Automatic handling of resolution changes during capture
- Optional tracing support for debugging
- Low-level access to Direct3D11 frames when needed
Requirements
- Windows 10 October 2018 Update (version 1809) or later
- Windows 11 (recommended)
- Rust 2024 edition
Installation
Add this to your Cargo.toml:
[]
= "*"
Usage
Here's a basic example of how to capture frames:
use *;
To enable tracing for debugging output, add the tracing feature and initialize a subscriber:
[]
= { = "*", = ["tracing"] }
= "0.3"
use *;
use EnvFilter;
Run with environment variable for verbose output:
set RUST_LOG=trace
cargo run --example hello_world --features tracing
Or in PowerShell:
$env:RUST_LOG="trace"
cargo run --example hello_world --features tracing
Examples
Check out the examples directory for more detailed usage examples:
hello_world.rs: Basic usage example- More examples coming soon...
Development Status
This crate is currently under active development. Features may be added, removed, or changed in future releases. Please check back regularly for updates.
API stability is not guaranteed until version 1.0.0 is released.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.