- Rust 59.1%
- Shell 21.9%
- HTML 17.6%
- Makefile 1.4%
|
Some checks failed
Build and Test / build-test (push) Failing after 2s
Build Linux Release / build-linux (linux-amd64, false, x86_64-unknown-linux-musl) (push) Failing after 10s
Build Linux Release / build-linux (linux-arm64, true, aarch64-unknown-linux-gnu) (push) Failing after 11s
Build macOS Release / build-macos (macos-amd64, x86_64-apple-darwin) (push) Has been cancelled
Build macOS Release / build-macos (macos-arm64, aarch64-apple-darwin) (push) Has been cancelled
|
||
|---|---|---|
| .github/workflows | ||
| crates/my_client | ||
| schemas | ||
| scripts | ||
| src | ||
| static | ||
| templates | ||
| tests | ||
| .gitignore | ||
| buildenv.sh | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| Makefile | ||
| openrpc.json | ||
| README.md | ||
my_router_path
What this is
A HeroLib-based HTTP server providing a JSON-RPC 2.0 interface for routing through a supernode mesh network. Built with Rust 1.92+ and Edition 2024, it handles edge registration, heartbeat, lookup, supernode link reporting, route finding, graph visualization, and benchmarking across a distributed network topology.
What this repository contains
src/main.rs— Server entry point with HTTP, JSON-RPC/rpc, and MCP/mcpendpointssrc/lib.rs— Library root exposing config, RPC, types, crypto, state, storage, routing, precompute, API, MCP, handlers, and logging modulessrc/handlers.rs— HTTP fragment handlers for UI visualizationsrc/precompute.rs— Background precomputation task for routing optimizationsrc/types.rs— Core type definitionssrc/config.rs— Server configurationsrc/state.rs— Application state managementsrc/logging.rs— Structured logging utilitiestests/— Integration, routing, and storage testsCargo.toml— Workspace manifest with root package andmy_clientcrateMakefile— Build targets for development and releaseschemas/models.oschema— OSchema type definitions
Build & Run
# Development mode (debug)
make rundev
# Release mode
make run
Test the server:
curl http://localhost:2918/health | jq
Available Make Targets
make build— Build release binarymake rundev— Run in development mode (with debug logs)make run— Run release binarymake test— Run all testsmake clean— Clean build artifactsmake check— Run cargo checkmake fmt— Format code with rustfmtmake clippy— Run clippy linter
Dependencies
- axum — HTTP framework
- tokio — Async runtime
- serde/serde_json — Serialization
- ed25519-dalek — Cryptographic node identity
- askama — HTML templating
- tower-http — CORS and middleware
- parking_lot / rayon — Concurrency
Role in the stack
This component provides the routing backbone for the Mycelium mesh network, enabling supernodes to report links, edges to register and heartbeat, and consumers to find optimal routes through the network. It exposes both a JSON-RPC API and an HTML UI for visualization and administration.
Relation to ThreeFold
This technology is used within the ThreeFold ecosystem and was first deployed on the ThreeFold Grid. The component itself is designed as reusable infrastructure technology and should be understood by its technical function first, independent of any specific deployment.
Ownership
This repository is owned and maintained by TF-Tech NV, a Belgian company responsible for the development and maintenance of this technology.
License
This project is licensed under the Apache License 2.0 — see the LICENSE file for details.