Skip to content

hxrts/bitchat-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bitchat Rust

A performant Rust implementation of the Bitchat protocol with WebAssembly support for browsers.

Overview

Decentralized, peer-to-peer messaging protocol designed for secure, private, and censorship-resistant communication over ephemeral mesh networks.

Core Features:

  • End-to-end encryption using Noise Protocol Framework (XX pattern)
  • BLE mesh networking with Nostr relay fallback
  • Location-based channels using geohash precision levels
  • Message fragmentation, compression, and deduplication
  • Binary wire protocol with full canonical compatibility

Advanced Features (opt-in via --features experimental):

  • File transfer with chunked uploads and SHA-256 integrity verification
  • Group messaging with role-based permissions
  • Multi-device session synchronization
  • Capability negotiation with graceful degradation

Architecture

CSP-based multi-task orchestrator with channel communication

  • bitchat-core - Protocol, cryptography, and data structures
  • bitchat-runtime - Task orchestration and lifecycle management
  • bitchat-ble / bitchat-nostr - Transport implementations
  • bitchat-cli / bitchat-web - Application frontends

Cryptography: Noise_XX_25519_ChaChaPoly_SHA256
Identity: Ed25519 signatures, Curve25519 keys
Sync: GCS filter-based gossip with Bloom deduplication

See docs/protocol-architecture.md for complete specification.

Building

Native

nix develop              # Enter development environment (optional)
just build               # Build all crates
just test                # Run tests
just demo                # Run CLI demo (BLE + Nostr)

With Experimental Features

cargo build --features experimental
cargo test --features experimental

WebAssembly

just build-wasm          # Build WASM module for web
just serve-web           # Serve demo at http://localhost:8000

Testing

The project includes comprehensive integration testing:

  • Canonical compatibility tests verify wire format compatibility
  • Property-based tests for message store integrity
  • Integration tests for transport and runtime behavior
  • Simulator for cross-implementation testing (see simulator/)

Reference

License

Licensed under Apache 2.0, see LICENSE.

About

Rust implementation of the Bitchat P2P messaging protocol.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages