Skip to content

BitChat v0.3.1 β€” Phase 1: Rust Core Acceleration, Performance Overhaul & Complete Uninstaller

Choose a tag to compare

@github-actions github-actions released this 09 Nov 11:05
· 43 commits to main since this release

BitChat v0.3.1 β€” Phase 1 Production Release: Rust Core Acceleration, Performance Overhaul & Complete Uninstaller

BitChat v0.3.1 delivers the Phase 1 architectural overhaul across Windows and Linux: a compiled Rust / PyO3 / Maturin native core (bitchat._bitchat_core) accelerating wire protocol serialization, fragmentation/reassembly, TCP stream framing, and mesh packet deduplication; Textual UI and event-loop optimizations eliminating peer-list and chat rendering jitter; and a complete cross-platform uninstallation engine (bitchat --uninstall) that cleans up standalone installers, pip/uv/pipx console-script wrappers (including Python314\Scripts\bitchat.exe), and PATH entries while preserving user identity and configuration by default.


What's Changed in v0.3.1

Performance

  • PeerSidebar In-Place Updates & Render Caching (src/bitchat/tui/widgets/sidebar.py): Replaced full container DOM teardown (remove_children()) with structural snapshot diffing and in-place PeerEntry.update_peer_data updates, reducing 10-peer sidebar refresh latency from 70.3 ms to 0.28 ms at P50 (248x faster) and 252.3 ms to 0.76 ms at P99 (331x faster).
  • Coalesced Peer & Transport Status Updates (src/bitchat/tui/app.py): Added status-bar state signature deduplication (_last_status_bar_signature) and debounced peer-list refresh scheduling (_schedule_peer_ui_refresh), reducing keyboard input latency under sustained multi-peer load by 4.69x at P99.
  • Batched Chat Message Rendering (src/bitchat/tui/widgets/chat_view.py): Wrapped message overflow pruning and widget mounting inside app.batch_update() and coalesced viewport scrolling via call_after_refresh (_schedule_scroll_end), cutting P99 chat render spikes by 5.58x.
  • BLE Advertisement Filtering Improvements (src/bitchat/ble/scanner.py): Added fast-path advertisement pre-filtering and RSSI hysteresis (< 3 dBm within 2.0s) in BLEScanner._detection_callback to eliminate redundant allocations on non-matching or unchanged BLE advertisements.
  • Reduced Mesh Packet-Processing Overhead (src/bitchat/mesh/router.py): Computed deterministic SHA-256 packet IDs once per hop and passed precomputed IDs through deduplication checks and recordings (5.91x higher router evaluation throughput).

Rust Acceleration (bitchat._bitchat_core)

  • Rust / PyO3 / Maturin Architecture (rust/bitchat-core/): Introduced a compiled Rust native extension crate built with maturin (abi3-py312) and pyo3 0.24, with full PEP 484 type stubs (src/bitchat/_bitchat_core.pyi) and runtime fallback loader (src/bitchat/_native.py).
  • Native Protocol Encoding & Decoding (rust/bitchat-core/src/protocol.rs): Accelerated binary wire packet serialization, header/routing/signature unpacking, peer ID hex conversion, and PKCS#7 optimal block padding (encode_packet_raw, decode_packet_raw, pad_packet_data, unpad_packet_data).
  • Fragmentation & Reassembly (rust/bitchat-core/src/fragmentation.rs): Accelerated payload chunk splitting, fragment header encoding/parsing, and stateful concurrent fragment reassembly (NativeFragmentReassembler, 5.20x faster 8 KB reassembly).
  • TCP Stream Framing (rust/bitchat-core/src/framing.rs): Implemented zero-copy cursor-indexed TCP length-prefixed framing (NativeStreamFramer and encode_frame_bytes), delivering a 27.37x throughput increase on 200-frame bursts.
  • Mesh Packet Identification, Deduplication & Rate Limiting (rust/bitchat-core/src/mesh.rs): Implemented native SHA-256 packet ID computation (compute_packet_id_raw), O(1) FIFO/LRU ring deduplication with monotonic TTL expiration (NativePacketDeduplicator), and per-peer token-bucket rate limiting (NativePeerRateLimiter).
  • Python Reference Implementations (py_* / Py*): Retained pure-Python reference implementations across encoder.py, decoder.py, packet.py, fragmentation.py, reassembly.py, framing.py, and dedup.py for fallback and differential verification.

Uninstaller

  • Unified Windows & Linux Uninstallation (src/bitchat/platform/uninstaller.py, bitchat --uninstall): Added a first-class cross-platform uninstaller supporting --uninstall, --remove-user-data (--purge), --keep-user-data, --dry-run, and --yes.
  • Python, pip, uv & pipx Launcher Cleanup: Automatically discovers and removes residual bitchat.exe, bitchat-script.py, bitchat.cmd, bitchat.ps1, and bitchat console-script wrappers and bitchat*.dist-info metadata across active, user-base, multi-version Programs\Python\Python3*\Scripts (including Python314\Scripts\bitchat.exe), uv tools, and pipx environments without modifying shared parent directories.
  • PATH & Packaging Lifecycle Cleanup: Cleans BitChat-specific user PATH entries (HKCU\Environment\Path), shortcuts, caches, and running bitchat processes across Windows Inno Setup (packaging/windows/bitchat.iss) and Debian maintainer scripts (packaging/linux/deb/prerm, packaging/linux/deb/postrm).
  • User-Data Preservation vs. Explicit Complete Removal: Preserves ~/.bitchat (identity keys, SQLite history, known peers, and configuration) by default during standard uninstallation, and removes ~/.bitchat only when explicitly requested via --remove-user-data / --purge / /REMOVEUSERDATA or interactive confirmation.

Compatibility and Security

  • Wire Compatibility Preserved: 100% byte-for-byte wire compatibility verified between the Rust native core and pure-Python reference implementations across all packet types, flags, fragmentation headers, and TCP frames.
  • Existing Noise XX & Identity Implementations Retained: Cryptographic Noise XX handshakes, X25519/Ed25519 identity management, and SQLite persistence remain intact.
  • Existing BLE, LAN & Offline Mode Behavior Preserved: Full compatibility with BLE GATT/Scanner, LAN UDP discovery/TCP transport, HomeScreen, strict 2:2:2 Peer Grid layout, and OFFLINE MODE isolation.

Downloadable Release Assets

Asset Name Platform / Target SHA-256 Checksum Description
BitChat-0.3.1-windows-x64.exe Windows 10/11 (x64) 2A2D68F5B7B975620AF7197030A6DD068C8A0D096AEEECFC69F5DBB3FA84A75A Self-contained Windows Setup Wizard 2.0 bundling Python runtime, _bitchat_core.pyd Rust extension, and complete uninstaller
BitChat-0.3.1-windows-x64.exe.sha256 Checksum 7618EA2F79A2CFA1211948AF9D0ED8586718F555FBED1AF81CC41ED09AFE1A3F SHA-256 verification file for Windows installer
bitchat_0.3.1_amd64.deb Debian / Ubuntu (x86_64) 42D60D72F6DD7FA78D2A2056388A716054B00A25EDDE451E9A848F5E6E0358F8 Native Debian package with compiled Rust core, desktop shortcut, terminal launcher, and prerm/postrm lifecycle scripts
bitchat_0.3.1_amd64.deb.sha256 Checksum D9DCA22DFD81F149EE8CF8F357C4E4F9F362A800C8E7F8C3588ECA2176E050B8 SHA-256 verification file for Debian package
BitChat-0.3.1-x86_64.AppImage Linux (Generic x86_64) 04F0D73BAA3D9063BD72C4C510CBDFD2B041E16B3EA5174411346920B35457E8 Self-contained portable Linux AppImage bundling the compiled Rust core with zero system dependencies
BitChat-0.3.1-x86_64.AppImage.sha256 Checksum 2D3694DFFA48D971D8427CDEF156580DBBA1C5BA87CE065DDC46B3E342F75456 SHA-256 verification file for AppImage
bitchat-0.3.1-cp312-abi3-win_amd64.whl Python 3.12+ (Windows x64) B5F7DB74CF31F39260106C3FB6FC66F5E090AC9BACB1349B8E1D2849ACF7C5D0 Precompiled Windows abi3 wheel containing native bitchat._bitchat_core Rust extension
bitchat-0.3.1-cp312-abi3-win_amd64.whl.sha256 Checksum B43171493A6244BE3B2E7655789EF3188F0AF4F2319BEFFD2CC3117EF2BF4CAB SHA-256 verification file for Windows wheel
bitchat-0.3.1-cp312-abi3-linux_x86_64.whl Python 3.12+ (Linux x86_64) 82E238D949B6103FA36D29B07FAB4FE748014954D9A56DAB284E202672265A2B Precompiled Linux abi3 wheel containing native bitchat._bitchat_core Rust extension
bitchat-0.3.1-cp312-abi3-linux_x86_64.whl.sha256 Checksum 7E18297A3990AAAFA34B1C11AC4C02F6A40D16F689374FF54A21B59B8EF1E176 SHA-256 verification file for Linux wheel
bitchat-0.3.1.tar.gz Source Distribution 3743DD4F3EF00543C2D759B8B33BDE8010A2DA6B513B2B59ACFB50D8B6969067 Complete Python + Rust (maturin) source distribution package
bitchat-0.3.1.tar.gz.sha256 Checksum A208192530B4CE0624F05F1960A3F1FDA9CDE2F314100F75F8F4E22FD90ABBC2 SHA-256 verification file for source distribution
Java-Mx.BitChat.yaml Windows Package Manager C614823018AA0A85ADF256C98FAAA71069EF57012B00862F2c1681B10A6F4A04 Microsoft WinGet singleton manifest for winget install

Full Changelog: v0.3.0...v0.3.1