master
Use SQLite for persistence and generate Rust protobuf bindings at build time. Add Docker image support for containerized deployment. Co-Authored-By: codex <[email protected]>
Brave Sync Server v2 Rust Port
Rust port of the Brave Sync v2 command server from /home/user/go-sync.
The server exposes:
GET /GET /health-checkPOST /v2/command/GET /metrics
Storage
This port uses SQLite instead of DynamoDB. On startup it creates the required tables automatically.
Environment variables:
SQLITE_PATH: SQLite database path. Defaults tobrave-sync.sqlite3.LISTEN_ADDR: HTTP listen address. Defaults to0.0.0.0:8295.BLOCKED_CLIENT_IDS: comma-separated lowercase or uppercase client public key hex values.HIGH_DEVICE_LIMIT_CLIENT_IDS: comma-separated client IDs allowed up to 100 active devices.
Build and Test
cargo test
cargo run
Docker
docker build -t brave-sync-rs .
docker run --rm -p 8295:8295 -v brave-sync-data:/var/lib/brave-sync brave-sync-rs
For bind mounts, the container starts as root only long enough to create/chown
the SQLite directory, then runs the server as the brave-sync user.
The protobuf Rust bindings are generated at build time from
schema/protobuf/sync_pb. A vendored protoc binary is used, so a system
protoc install is not required.
Languages
Rust
98.4%
Dockerfile
1.3%
Shell
0.3%