No description
- Rust 69.2%
- Shell 14%
- JavaScript 7.7%
- HTML 6.5%
- Makefile 2.2%
- Other 0.4%
|
Some checks failed
Build / build-and-test (push) Failing after 0s
Build / build-linux (linux-arm64, true, aarch64-unknown-linux-gnu) (push) Has been skipped
Build / build-macos (macos-amd64, x86_64-apple-darwin) (push) Has been skipped
Build / build-macos (macos-arm64, aarch64-apple-darwin) (push) Has been skipped
Build / build-linux (linux-amd64, false, x86_64-unknown-linux-musl) (push) Has been skipped
- Replace manual JSON-RPC proxy implementation with openrpc_proxy! macro from herolib_derive. This auto-generates /rpc, /health, and /.well-known/openrpc.json endpoints from the server's OpenRPC spec, eliminating ~100 lines of manual code. - Add herolib_derive to workspace dependencies with git source - Add dirs crate dependency to hero_sync_ui (required by openrpc_proxy! macro) - Create integration tests in hero_sync_examples/tests/integration.rs - Tests server health check - Tests OpenRPC spec discovery - Tests info endpoint - Uses zinit for service lifecycle management - Demonstrates proper SDK usage patterns All changes maintain Unix socket architecture (no TCP), socket permissions (0o770), and discovery manifest endpoints. Code compiles and passes all checks. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .claude | ||
| .forgejo/workflows | ||
| crates | ||
| scripts | ||
| services | ||
| .gitignore | ||
| buildenv.sh | ||
| Cargo.lock | ||
| Cargo.toml | ||
| Makefile | ||
| README.md | ||
| SPEC.md | ||
| test_server.sh | ||
Hero Sync
Multi-protocol file synchronization for the Hero Ecosystem.
Workspace Structure
This is a Cargo workspace with 5 crates:
| Crate | Type | Description |
|---|---|---|
hero_sync_sdk |
library | SDK: types, config, error handling, and async Unix socket client |
hero_sync_server |
binary | OpenRPC backend server (Unix socket only, no UI) |
hero_sync |
binary | CLI tool for managing sync profiles and running sync operations |
hero_sync_ui |
binary | Web dashboard UI with embedded static assets (Bootstrap, Unpoly) |
hero_sync_examples |
examples | Example programs demonstrating SDK usage |
Dependency graph
hero_sync_sdk (no internal deps)
^ ^ ^
| | |
CLI UI examples
hero_sync_server (standalone — business logic + OpenRPC)
Sockets
| Service | Binding | Path |
|---|---|---|
hero_sync_server |
Unix socket (OpenRPC) | ~/hero/var/sockets/hero_sync_server.sock |
hero_sync_ui |
Unix socket (HTTP + /rpc proxy) | ~/hero/var/sockets/hero_sync_ui.sock |
No service binds TCP. Only hero_proxy exposes TCP.
Building
# Build all crates (release)
make build
# Build specific crate
cargo build --release -p hero_sync
cargo build --release -p hero_sync_server
Running
# Start server + UI (server on socket, UI on socket)
make run
# Use the CLI
./target/release/hero_sync list
./target/release/hero_sync sync <profile>
./target/release/hero_sync pull <profile>
./target/release/hero_sync push <profile>
./target/release/hero_sync health
Development
make check # Fast type-check all crates
make test # Run all tests
make fmt # Format code
make lint # Run clippy
make rundev # Run server + UI in debug mode
Static Assets
The web dashboard uses Bootstrap 5, Bootstrap Icons, and Unpoly. To download/update these:
make download-assets
Assets are embedded into the hero_sync_ui binary via rust-embed.