A Wi-Fi Display (Miracast) source for Ubuntu — cast your screen to any Miracast-compatible receiver (TVs, dongles, displays).
This project is in its initial development phase (0.x.y). Per SemVer §4, the public API is not yet stable — any release may introduce breaking changes.
- Cast your screen — stream your desktop or application windows to Miracast receivers
- Automatic discovery — find Miracast sinks via Wi-Fi Direct P2P (D-Bus integration, no sudo)
- WFD protocol compliant — full RTSP M1-M7 session negotiation per WFD spec v2.3
- Hardware-accelerated encoding — VA-API when available, falls back to x264
- In-process GStreamer — native pipeline (no subprocess), real-time stats
- Modern UI — GTK 4 + libadwaita interface following GNOME HIG
- Single binary — no Python interpreter, no venv, no system-site-packages
# Install Rust toolchain (if not already installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
# Ubuntu 24.04+ system dependencies
sudo apt install \
libgtk-4-dev libadwaita-1-dev \
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly \
pkg-config build-essentialcargo build --releasecargo runcargo testsrc/
├── main.rs # Application entry point (GStreamer init, AdwApplication)
├── rtsp/ # RTSP 1.0 protocol (RFC 2326 + WFD extensions)
│ ├── messages.rs # Request/response parser/builder with DoS protection
│ └── session.rs # Async M1-M7 session negotiation (tokio TCP)
├── wfd/ # Wi-Fi Display parameters
│ └── mod.rs # Video formats, audio codecs, resolution tables
├── discovery/ # Wi-Fi Direct P2P discovery
│ └── mod.rs # D-Bus integration (zbus → wpa_supplicant/NetworkManager)
├── streaming/ # GStreamer pipeline (in-process)
│ └── mod.rs # ximagesrc → x264enc → mpegtsmux → rtpmp2tpay → udpsink
├── config/ # Configuration management
│ └── mod.rs # XDG paths + serde + TOML
└── ui/ # GTK4 + libadwaita UI
└── mod.rs # Application window, adaptive layout
# Install dev tools
cargo install cargo-audit cargo-deny git-cliff
# Run linting
cargo clippy -- -D warnings
# Format code
cargo fmt
# Security audit
cargo audit
# Generate changelog
git-cliff -o CHANGELOG.mdSee CONTRIBUTING.md for the full development guide.
- Architecture — module design, data flow, implementation roadmap
- Agent Context — AI agent quick-start (what's done, what's next, patterns)
- Changelog — version history (generated by git-cliff)
- ADRs — Architecture Decision Records
- ubuntu-miracast-server — the companion Miracast sink (receiver) application
- ubuntu-miracast-client — the original Python implementation (being replaced by this Rust version)
This project is licensed under the MIT License — see the LICENSE file for details.
- gnome-network-displays for reference Miracast source implementation
- wpa_supplicant for Wi-Fi Direct P2P support
- GStreamer for media pipeline infrastructure
- GTK and libadwaita for the UI framework
- gtk-rs for the excellent Rust GTK4 bindings
- The Wi-Fi Display (Miracast) specification by the Wi-Fi Alliance
0 comments
log in to comment.