nashaofu / xcap

XCap is a cross-platform screen capture library written in Rust. It supports Linux (X11, Wayland), MacOS, and Windows. XCap supports screenshot and video recording (to be implemented).
https://docs.rs/xcap
Apache License 2.0
459 stars 55 forks source link

0.0.3 will not compile on Linux #103

Closed trakout closed 7 months ago

trakout commented 7 months ago

Steps to reproduce:

Output:

Compiling xcap v0.0.3
error[E0446]: crate-private type `ImplMonitor` in public interface
  --> /(path_redacted)/xcap-0.0.3/src/linux/capture.rs:25:1
   |
25 | pub fn capture_monitor(impl_monitor: &ImplMonitor) -> XCapResult<RgbaImage> {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak crate-private type
   |
  ::: /(path_redacted)/xcap-0.0.3/src/linux/impl_monitor.rs:17:1
   |
17 | pub(crate) struct ImplMonitor {
   | ----------------------------- `ImplMonitor` declared as crate-private

Edit - upgraded rustc to 1.75.0 and it works, closing!