A VS Code extension for peer-to-peer collaborative development using the Braid protocol over Iroh networking.
Link IDE enables real-time collaboration between developers through:
- P2P Chat: Gossip-based messaging with persistent history
- File Sharing: Content-addressed file transfer using bitswap protocol
- Audio Calls: WebRTC-based voice communication (infrastructure ready)
- Resource Sync: Braid-HTTP protocol for CRDT-based state synchronization
The project consists of three main components:
link_ide_extension/
├── src/ # TypeScript VS Code extension
├── braid-http-rs/ # Braid protocol implementation
├── braid-iroh-lib/ # P2P networking and file transfer library
└── braid-iroh-cli/ # Rust CLI sidecar
-
VS Code Extension (TypeScript)
- Provides UI (webview panels, tree views, commands)
- Manages extension lifecycle
- Communicates with Rust CLI via JSON-RPC over stdin/stdout
-
Braid-Iroh CLI (Rust)
- Sidecar binary spawned by the extension
- Handles P2P networking through Iroh
- Processes JSON-RPC commands from TypeScript
-
Braid-Iroh Library (Rust)
- Core P2P functionality
- File chunking, storage, and transfer
- Braid protocol implementation
-
Braid-HTTP Library (Rust)
- Braid protocol primitives
- Update/Patch handling
- Version vector management
# Install dependencies
npm install
# Build Rust CLI
npm run build:rust
# Start TypeScript watcher
npm run watchIn VS Code:
- Press F5 to launch extension development host
- Run "Link IDE: Setup" command to initialize
- Share your Node ID with peers
# Full build
npm run compile
npm run build:rust
# Package extension
vsce packagesrc/
├── extension.ts # Extension entry point
├── setupWebview.ts # Setup UI (dark/light theme)
├── sidecar.ts # CLI process management
├── treeProviders.ts # File tree and peer list
└── collaboration/ # Chat and session management
├── chat.ts # Braid-based chat implementation
└── session.ts # Session state management
Files are chunked using FastCDC algorithm, hashed with Blake3, and organized into Merkle trees. Content is addressed by CID (Content Identifier) and can be:
- Stored locally (memory or filesystem)
- Announced to the network via gossip
- Fetched from peers using bitswap protocol
Uses Braid resource subscription on /chat topic:
- Messages synchronized via periodic merge (2s interval)
- Deduplication by message ID
- History available for late joiners
Each session generates a random Ed25519 keypair:
- Node ID displayed as first 5 characters + "..."
- New identity on each login (not persisted)
- Logout reloads window to splash screen
The extension stores state in VS Code's global storage:
nodeId: Current node identifiernodeName: Display name for the node
- Iroh 0.96.1: P2P QUIC networking with NAT hole punching
- Iroh-Gossip 0.96: Topic-based pub/sub for chat and announcements
- Blake3: Content hashing
- FastCDC: Content-defined chunking
MIT OR Apache-2.0