A proof of concept Chrome extension for group video calls built with Rust, WebAssembly, and WebRTC.
- SFU Architecture: Scalable Selective Forwarding Unit (not tested for 100+ participants)
- WebRTC DataChannels: Low-latency chat messaging without central relay
- SQLite-WASM: Local persistent storage using Origin Private File System (OPFS)
- Cloudflare Tunnel: Secure external access via
cloudflared - Auto-Delete Messages: Transient chat logs cleared on call end
- Admin Interface: Separate web-based UI with persistent logs
- Dark Mode UI: High-contrast off-white on black theme
- Manifest V3: Modern Chrome extension architecture with service workers
- Simulcast Support: Multiple quality layers for adaptive streaming
This project uses a Cargo workspace with multiple crates:
video-chat-extension/
├── crates/
│ ├── core/ # Core business logic (platform-agnostic)
│ ├── signaling/ # WebRTC signaling protocol
│ ├── media/ # Media stream & DataChannel management
│ ├── wasm/ # WASM bindings and Chrome API
│ ├── sfu-client/ # SFU client logic
│ └── sfu-server/ # SFU server implementation
├── extension/ # Chrome extension files (HTML/CSS/JS)
├── admin/ # Web-based admin interface
└── tests/ # Integration tests
- Rust Compiled to WASM for browser execution
- WebRTC SFU-based video/audio + DataChannels for chat
- SQLite-WASM Local database with OPFS
- STUN/TURN NAT traversal and relay servers
- SFU Server Self-hosted media router for scalable streaming
- Cloudflare Tunnel Expose SFU server and signaling
- Rust 1.70+ (
rustup install stable) - wasm-pack (
cargo install wasm-pack) - Node.js 18+ (for extension development)
- cloudflared (for tunnel setup)
-
Clone the repository
git clone <repository-url> cd video_chat_extension
-
Build the project
cargo build --workspace
-
Run tests
cargo test --workspace -
Build WASM module
cd crates/wasm wasm-pack build --target web -
Load extension in Chrome
- Navigate to
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked"
- Select the
extension/directory
- Navigate to
This project is developed in 7 stages, each with complete tests:
| Stage | Focus | Status |
|---|---|---|
| 0 | Project initialization | Complete |
| 1 | Core foundation & SFU signaling | Complete |
| 2 | WASM bridge & SQLite | Complete |
| 3 | Media streams & SFU connection | Complete |
| 4 | SFU client & room management | Complete |
| 5 | UI & admin interface | Pending |
| 6 | SFU server & production | Pending |
See implementation_plan.md for detailed stage breakdown.
# Run all tests
cargo test --workspace
# Run with coverage
cargo tarpaulin --out Html --workspace
chmod +x scripts/coverage.sh && ./scripts/coverage.sh
# Run clippy
cargo clippy --all-targets --all-features --workspace -- -D warnings
# Format code
cargo fmt --all
# WASM tests (after Stage 2)
cd crates/wasm && wasm-pack test --headless --firefox# Development build
cargo build --workspace
# Release build (optimized)
cargo build --workspace --release
# WASM build (for extension)
wasm-pack build crates/wasm --target web --out-dir ../../extension/pkg
# WASM build (for web)
wasm-pack build crates/wasm --target web --out-dir ../../web/pkg
# Server
cargo build --bin video-chat-sfu-server --release
# Run server
cargo run --bin video-chat-sfu-server --release
# Run benchmarks
cargo bench- Stage 1: Core Foundation & WebRTC Signaling
- Stage 2: WASM Bridge & Chrome Extension Interface
- Stage 3: Media Stream Management & Peer Connections
- Stage 4: Rust-to-JS Bridge & UI Utilities
- Stage 5: UI Components & Admin Interface
- Stage 6: Production Readiness (SFU Server, SQLite Persistence, Telemetry)
Comprehensive guides are available in the docs/ directory:
- Architecture - System design, SFU architecture, and data flow
- API Reference - WASM interface and signaling protocol
- Deployment Guide - Server deployment and Cloudflare Tunnel setup
- SFU Setup - Detailed SFU server configuration
- User Guide - End-user instructions for the extension
- CHANGELOG - Version history and release notes
- Benchmarks: Run
cargo benchto see performance metrics - Telemetry: See
crates/core/src/telemetry.rsfor logging and analytics - SQLite WASM: Persistent storage implementation in
crates/wasm/src/sqlite.rs
See CONTRIBUTING.md for development guidelines.
- Formatting:
cargo fmt(enforced by CI) - Linting:
cargo clippywith pedantic warnings - Testing: >80% code coverage required
- Documentation: All public APIs must be documented
This project is licensed under MIT OR Apache-2.0.
- No unsafe Rust code allowed
- All dependencies audited with
cargo audit - Transient message storage (auto-delete on call end)
- Optional persistent logs for admin only
- Chrome 90+ (Manifest V3 required)
- Edge 90+ (Chromium-based)
For issues and questions, please open a GitHub issue.
Built with love using Rust and WebAssembly