Encrypted peer-to-peer file transfer with a shared Rust core and two frontends.
crates/core: transfer engine and protocol logiccrates/cli: command-line appcrates/android-bindings: Rust bridge for Androidandroid/: Android app (Jetpack Compose)electron/: Electron desktop GUI (Windows/Linux)
cargo run -p p2p-share -- send ./file.txt
cargo run -p p2p-share -- send ./file.txt ./photo.jpg ./notes.pdf
cargo run -p p2p-share -- receive p2psh:... --output .Build Android app:
cd android
./gradlew assembleDebugRun desktop GUI:
cd electron
npm install
npm run devDesktop GUI notes:
- The GUI runs the existing Rust CLI under the hood using structured JSON events (
--json). - It supports all transfer modes:
- send and wait (
send <FILE>...) - send to receiver ticket (
send <FILE>... --to <TICKET>) - receive from target (
receive <TARGET> --output <DIR>) - receive listen/QR mode (
receive --qr --output <DIR>)
- send and wait (
- For best performance, build the CLI first:
cargo build --release -p p2p-share- Packaging scripts are available in
electron/package.json(dist:win,dist:linux). Build each target on its native OS for the most reliable results. - Packaged desktop builds include the CLI binary inside the app (
resources/bin/<os>/<arch>), so they run standalone. - If you run the GUI from source and auto-detection fails, set
P2P_SHARE_CLI_PATHto a built binary path before launching Electron.
Run tests:
cargo test --workspace --all-targetsThis repository includes GitHub Actions workflows:
.github/workflows/ci.yml: builds CLI on Linux and Windows, and builds Android debug APK on pushes/PRs..github/workflows/release.yml: builds and publishes release artifacts on tags likev0.3.0.
When you push a tag vX.Y.Z, the release workflow publishes:
p2p-share-cli-vX.Y.Z-linux-x86_64.tar.gzp2p-share-cli-vX.Y.Z-windows-x86_64.zipp2p-share-gui-vX.Y.Z-linux-x86_64.AppImagep2p-share-gui-vX.Y.Z-linux-x86_64.tar.gzp2p-share-gui-vX.Y.Z-windows-x86_64.exep2p-share-gui-vX.Y.Z-windows-x86_64.zipp2p-share-android-vX.Y.Z.apk(when Android signing secrets are configured)p2p-share-checksums-vX.Y.Z.txt
Set these in Settings -> Secrets and variables -> Actions:
ANDROID_KEYSTORE_BASE64ANDROID_KEYSTORE_PASSWORDANDROID_KEY_ALIASANDROID_KEY_PASSWORD
- Ensure
crates/cli/Cargo.tomlversion matches the intended tag version. - Create and push a tag:
git tag v0.3.0
git push origin v0.3.0