Prerequisites
- Rust stable (1.80+).
- macOS: Xcode command-line tools. Windows: MSVC build tools.
- To run
serve/connectlive you need OS permission (see below).
Everyday commands
cargo test runs 23 unit tests across protocol (wire + crypto) and app
(bulk framing, file transfer, config, edge, cursor). None require a display or
special permissions — keep it that way so CI stays green.
OS permissions (for live testing)
- macOS
- Windows
System Settings → Privacy & Security →
- Accessibility (rdev capture + enigo injection), and
- Input Monitoring (rdev).
ShareClick.app. Permissions are tied to
the bundle identity, so a packaged .app remembers the grant; a bare
binary run from Terminal ties the grant to Terminal.Running a real two-machine test
Project conventions
Keep the hot path allocation-light and lock-free
Keep the hot path allocation-light and lock-free
transport.rs uses a dedicated blocking socket and immutable cipher state
precisely to avoid scheduler jitter and per-packet locks. Don’t add a Mutex
to the send/recv path.Native code goes behind #[cfg(feature = native)]
Native code goes behind #[cfg(feature = native)]
Pure logic (protocol, framing, geometry) stays testable without it.
Every new wire message gets a round-trip test
Every new wire message gets a round-trip test
Every geometry/state helper (
edge.rs, cursor.rs) gets unit tests — they
encode the UX rules.Latency is a tracked metric
Latency is a tracked metric
Before/after a change on the input path, run
bench --encrypted and confirm
no regression. The autoresearch log (autoresearch.jsonl) records the
history.Adding a feature (checklist)
Wire message? Update the protocol
Update the wire protocol docs, add a test, and consider
bumping
PROTOCOL_VERSION.Update the docs
The architecture module map and
CHANGELOG.md.Repository layout
Next
Decision log
The “why” behind the architecture.
Releasing
How to ship a new version.