Established the foundational Rust/Python hybrid architecture using PyO3 and Maturin. Eliminated UI jitter, event loop blocking, and redundant serialization overhead while implementing an atomic uninstallation system.
✓ Native Rust Extension (_bitchat_core)
Maturin & PyO3 workspace crate providing wire-speed CRC32, framing, and routing.
✓ NativeStreamFramer & Packet Router
8-byte binary framing (BC\x01\x00) with memory-bounded replay deduplication.
✓ Dual Transport (BLE + LAN)
Linux BlueZ D-Bus and Windows WinRT peripheral/central plus LAN UDP/TCP sockets.
✓ Complete Uninstaller System
CLI uninstallation via bitchat --uninstall with optional --remove-user-data.
✓ Inno Setup & WinGet Distribution
Windows standalone installer and automated package manager submission manifest.
✓ Comprehensive Documentation Overhaul
Audited legal, security, architecture, and protocol documentation with unit test suite.
Implemented end-to-end Rust cryptographic primitives (ChaCha20-Poly1305, Ed25519, X25519, HKDF, PBKDF2), the full Noise XX mutual authentication handshake state machine, zeroizing in-memory secret key buffers, and native wire stream framing in _bitchat_core.
✓ Rust Cryptographic Primitives
Hardware-accelerated ChaCha20-Poly1305, Ed25519 dalek, X25519, HKDF-SHA256, PBKDF2.
✓ Native Noise XX State Machine
Mutual 3-message authentication, ephemeral DH keys, split transport cipher states.
✓ Zeroize Memory Security
Automatic zeroing on drop for private keys, ephemeral secrets, and symmetric encryption keys.
✓ Wire Framing & Replay Mitigation
Standard 8-byte frame magic (BC\x01\x00) with bounded LRU replay protection.
Made Rust the authoritative execution owner for Noise XX sessions, single-pass mesh routing, peer state management, collision-safe identity binding, and cohesive single-FFI protocol dispatch.
Read the v0.3.3 Rust Migration Impact Report →
✓ Authoritative NativeNoiseSession & Nonce Safety
Single Rust-owned cipher state with embedded 12-phase FSM, zero eager Python key copies, strict nonce-0 replay protection, and u32::MAX exhaustion fail-closed enforcement.
✓ Cohesive Single-Crossing NativeProtocolEngine
Decode, fragment reassembly, mesh routing, Noise XX dispatch, and outbound encoding in 1 PyO3 crossing (7.28x faster inbound DM pipeline and ~132x lower Python tracemalloc peak allocation in measured 1,000-frame workloads).
✓ Stage 3 Peer State Engine & Legacy TUI Interop
Controlled legacy bitchat-tui 4-byte-zero-extended peer-ID support with post-auth collision-safe pinning, bounded DM queues (32/peer, 512 global), and distinct observed/authenticated/verified trust levels.
✓ Single-Pass Mesh, LAN Rate Limiter & BLE MTU Sizing
Eliminated duplicate Python/Rust mesh execution; wired NativeIpRateLimiter and controller ATT MTU write chunking.
Delivered the modular native Rust BLE transport stack across Windows WinRT, Linux BlueZ D-Bus (zbus), and macOS CoreBluetooth probing, decoupled Windows GATT/companion advertisement lifecycle, added bitchat-tui binary DM payload decoding, upgraded Bluetooth Settings diagnostics, and eliminated TUI mouse navigation jitter.
Read the Phase 3 Verification Report →
✓ Modular Native Rust BLE Backends
Implemented rust/bitchat-core/src/ble/ with GIL-free Windows WinRT (windows 0.58), Linux BlueZ D-Bus (zbus 5), and macOS CoreBluetooth probe backends.
✓ Decoupled Windows GATT & Strict BLE Validation
Companion manufacturer publisher failures no longer tear down active GATT services; enforced 8-byte peer IDs and strict GATT notify/write checks.
✓ bitchat-tui Binary DM Payload Interop
Native Rust decoding for UTF-8, [0x04]+UTF-8, [0x04]+BitchatMessage, bare BitchatMessage, and nested BitchatPacket payloads with strict fail-closed Noise XX security.
✓ Live Bluetooth Diagnostics & Mouse Jitter Fix
Live async Bluetooth Settings telemetry with canonical BitChat UUIDs, plus single-dispatch StatusBar mouse clicks and flicker-free DataTable refreshes.
Logic foundations (lan.rs, ble.rs) are already wired into runtime execution; this phase migrates the remaining Python asyncio socket loops and OS BLE drivers natively into Rust.
View full acceptance criteria in ROADMAP.md →
• Stage 4: Full Tokio LAN Transport Runtime
Move active UDP discovery loops, TCP listener/client management, and 32-connection bounds from Python asyncio into Tokio feeding NativeProtocolEngine directly.
• Stage 5: Native OS BLE Central & Peripheral Drivers
Replace Bleak / WinRT / BlueZ D-Bus Python wrappers with native Rust OS backends (windows-rs, zbus/bluer, CoreBluetooth).
• Stage 6: Native Session Coordinator & Encrypted Storage
Move remaining coordinator orchestration, ~/.bitchat/ persistence, redacted logging, and optional passphrase-protected identity.json encryption into Rust.
• Physical Multi-Machine Over-the-Air Hardware Testing
Validate live BLE and LAN sessions across physical Windows, Linux, macOS, and bitchat-tui hosts.
Only after Stages 4–6 reach full feature and test parity: replace the Python Textual UI and CLI with a standalone native Rust application, removing Python, PyO3, and Maturin completely.
• 100% Native Rust TUI (Ratatui) & CLI
Replace Textual with a native Rust terminal UI preserving Home Screen, Peer Sidebar, Chat View, Settings, and slash commands.
• Elimination of Python Runtime
Single standalone native binary per supported OS/architecture with minimal memory footprint.
• Native macOS CoreBluetooth & Installers
Native macOS BLE Peripheral support and signed native distribution bundles where supported.
• Independent Third-Party Security Audit
Formal cryptographic review of the completed native Rust implementation.