RustVNC

Production-ready Rust libraries for VNC protocol implementation

Build VNC servers, clients, proxies, and recording tools with memory safety, modern async I/O, and full RFC 6143 compliance.

cargo add rustvncserver

Why RustVNC?

🛡️

Memory Safe

Zero buffer overflows, use-after-free bugs, or data races. Rust's ownership system prevents entire classes of vulnerabilities that plague C/C++ VNC implementations.

High Performance

Zero-copy framebuffer updates, SIMD-optimized encoding, and persistent compression streams. Built on Tokio for efficient async I/O.

📋

RFC 6143 Compliant

Full protocol implementation with 11 encoding types. Works with all VNC clients: TightVNC, RealVNC, TigerVNC, noVNC, and more.

🧩

Modular Design

Use what you need. From low-level encoding algorithms to complete server implementations. Build servers, clients, proxies, or recorders.

Core Libraries

rustvncserver

Complete VNC server library with async I/O, authentication, and all standard encodings.

use rustvncserver::VncServer;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let server = VncServer::new(1920, 1080);
    server.set_password(Some("secret".into()));
    server.listen(5900).await?;
    Ok(())
}

rfb-encodings

Standalone RFB encoding implementations. Use in servers, clients, proxies, or recording tools.

Raw CopyRect RRE Hextile Zlib Tight ZRLE ZYWRLE TightPng +more

Example Implementation

RustVNC for Android

A production Android app demonstrating rustvncserver in action. Full-featured VNC server with screen sharing, remote input, reverse connections, and automation APIs.

  • Screen sharing with configurable scaling
  • Reverse VNC and UltraVNC repeater support
  • Built-in noVNC web client
  • Intent-based automation API

Encoding Performance

Compression ratios for 1920×1080 framebuffer updates

Encoding Compression Best For
Raw 1:1 (~8.3 MB) LAN, unlimited bandwidth
CopyRect ∞:1 (8 bytes) Scrolling, window dragging
Tight JPEG 16-83:1 General purpose
ZRLE 5-20:1 Text, diagrams
ZYWRLE 10-55:1 Low bandwidth, lossy
TightPng 8-40:1 Lossless compression

Ready to build?

Add rustvncserver to your project and start building.

cargo add rustvncserver