lamco-wayland 0.6.5

Wayland screen capture, XDG Portal integration, and video processing for Rust, by Lamco Development LLC
docs.rs failed to build lamco-wayland-0.6.5
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.

Lamco Wayland Libraries

Rust libraries for Wayland screen capture, XDG Portal integration, and video processing.

Crates.io Documentation CI License

Website · Documentation · Source

Crates

Crate Version Description
lamco-wayland Crates.io Meta-crate with all libraries
lamco-portal Crates.io XDG Desktop Portal integration
lamco-pipewire Crates.io PipeWire screen capture
lamco-video Crates.io Video processing & RDP bitmap conversion

Quick Start

[dependencies]
# Use everything
lamco-wayland = "0.6"

# Or select what you need
lamco-wayland = { version = "0.6", default-features = false, features = ["portal"] }

Versions & compatibility

The capture crates ship two parallel supported lines on the PipeWire/SPA 0.10 bindings, plus a legacy 0.9-era line. The meta-crate version tracks the line:

Line lamco-wayland lamco-pipewire lamco-portal lamco-video PipeWire bindings libpipewire floor
0.6.x (modern head) 0.6.3 0.6.3 0.4.2 0.3.0 0.10 0.3.62
0.5.x (low floor) 0.5.2 0.5.2 0.4.1 0.2.0 0.10 0.3.33
0.4.x (legacy) 0.4.7 0.4.5 0.4.1 0.1.10 0.9 0.3.33
  • New code → lamco-wayland = "0.6" — safe (unsafe-free) PipeWire metadata internals, real cursor pixels, current dependencies; needs system libpipewire ≥ 0.3.62.
  • Older/minimal environments → lamco-wayland = "0.5" — same 0.10 bindings and the same DMA-BUF race fix, with a lower floor (libpipewire ≥ 0.3.33).

Both 0.5.2 and 0.6.3 carry the DMA-BUF mmap-cache cross-thread race fix. MSRV is Rust 1.87 (edition 2024) on every current line. The 0.5 and 0.6 lines are not semver-compatible with each other — pin to one deliberately. Full detail: docs/COMPATIBILITY.md.

use lamco_wayland::prelude::*;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Create portal manager
    let manager = PortalManager::with_default().await?;

    // Create session (triggers permission dialog)
    let session = manager.create_session("my-session".to_string(), None).await?;

    // Access PipeWire for video capture
    let fd = session.pipewire_fd();
    let streams = session.streams();

    println!("Capturing {} streams on PipeWire FD {}", streams.len(), fd);

    Ok(())
}

Features

Feature Default Description
portal Yes XDG Desktop Portal integration
pipewire Yes PipeWire screen capture
video Yes Video frame processing
full No All features from all sub-crates

Use Cases

  • RDP servers - Lamco RDP Server, custom implementations
  • VNC servers - Wayland support for VNC
  • Screen recording tools - Capture Wayland displays
  • Video conferencing - Screen sharing applications
  • Computer vision - Process Wayland screen content
  • Accessibility tools - Screen readers, automation

Requirements

  • Wayland compositor - GNOME, KDE Plasma, Sway, etc.
  • xdg-desktop-portal - Desktop Portal implementation
  • PipeWire - For video streaming (lamco-pipewire only)

Not compatible with X11 - Wayland only.

Architecture

┌─────────────────────────────────────────────────────────────────┐
│                        lamco-wayland                            │
├─────────────────┬─────────────────────┬─────────────────────────┤
│   lamco-portal  │   lamco-pipewire    │      lamco-video        │
│                 │                     │                         │
│  PortalManager  │  PipeWireManager    │  BitmapConverter        │
│  SessionHandle  │  VideoFrame         │  FrameProcessor         │
│  PortalConfig   │  PipeWireConfig     │  FrameDispatcher        │
└────────┬────────┴──────────┬──────────┴────────────┬────────────┘
         │                   │                       │
         ▼                   ▼                       ▼
   XDG Desktop Portal   PipeWire API            RDP Bitmap Format

Platform Support

Compositor Status Backend
GNOME ✅ Tested xdg-desktop-portal-gnome
KDE Plasma ✅ Tested xdg-desktop-portal-kde
Sway / wlroots ✅ Tested xdg-desktop-portal-wlr
Hyprland ⚠️ Should work xdg-desktop-portal-hyprland
Other Wayland ⚠️ May work Depends on portal backend
X11 ❌ Not supported Wayland only

Development

# Clone repository
git clone https://github.com/lamco-admin/lamco-wayland.git
cd lamco-wayland

# Build all crates
cargo build --workspace

# Run tests
cargo test --workspace

# Build documentation
cargo doc --no-deps --workspace --open

About

These libraries are extracted from the Lamco RDP Server project but designed for general use. They work with any Wayland compositor and are not RDP-specific.

Built with production-tested code from real-world remote desktop deployment.

License

Licensed under either of:

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.

Links