aboutsummaryrefslogtreecommitdiffstats
path: root/docs/architecture.md
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-28 22:11:12 +0000
committertv <tv@krebsco.de>2026-11-29 00:22:34 +0000
commit479246f98be360b5943458bd58d07e6d46f81fd0 (patch)
tree0931722a9151e5f65180e8260f9e3faf7780c1ab /docs/architecture.md
parentfdfe968d7abb6470e65253a720f87b82f5d5e388 (diff)
config: what a configuration imports by, in a crate of its own
Importers and placeholders (env:, file:, cmd:, ${…}, +json, $$, the tables) move from config::import to the crate config, crates/config, as its module import, as they were, public: the crate is for what a program's configuration is made of, from its files and its arguments, and other programs make theirs with it. The repository is a workspace of the node and that crate, both default members, so that cargo quick, cargo sim and clippy take in both.
Diffstat (limited to 'docs/architecture.md')
-rw-r--r--docs/architecture.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/architecture.md b/docs/architecture.md
index f462fe7..69b0cc3 100644
--- a/docs/architecture.md
+++ b/docs/architecture.md
@@ -305,7 +305,7 @@ Roughly by size and by how many rules interact there:
| [`swarm/peer/`](../src/swarm/peer/) + [`sync.rs`](../src/swarm/sync.rs) + [`source.rs`](../src/swarm/source.rs) | 2,300 | The protocol state machine: handshake, liveness, sync sessions with deadlines, who syncs with whom while catching up. Timing-dependent; tested on the simulated network ([`simtest/`](../src/simtest/)). |
| [`state/`](../src/state/) | 1,600 | `AppState` and its write helpers ([`mod.rs`](../src/state/mod.rs)), `PeerState` ([`peer.rs`](../src/state/peer.rs)), `Timing`, reads ([`read.rs`](../src/state/read.rs)) and the `Host` impl ([`host.rs`](../src/state/host.rs)). A hub, not a layer. |
| [`transport/`](../src/transport/) | 11,500 | libp2p ([`libp2p/`](../src/transport/libp2p/), 4,400: addresses, relays, hole punching, which paths to keep), the paths and identity layers (2,300: measuring, failing over, proving node IDs), Mycelium and its daemon ([`mycelium/`](../src/transport/mycelium/), 1,200), Tor (700), the wire format ([`wire.rs`](../src/transport/wire.rs), derived), the simulator. The transports are self-contained behind the `Transport` trait; libp2p's choice of addresses is the subtle part. |
-| [`config/`](../src/config/) | 2,800 | Layered sources, importers and placeholders, conflicts, the report. Self-contained. |
+| [`config/`](../src/config/), [`crates/config/`](../crates/config/) | 3,300, 500 | Layered sources, conflicts, the report; importers and placeholders, in a crate of their own (`config`), which other programs use too. Self-contained. |
| [`document/store.rs`](../src/document/store.rs) | 1,200 | Conflict-aware JSON over Automerge. Subtle (merged maps, canonical writes), well covered by the rest relying on it. |
| [`swarm/topology/`](../src/swarm/topology/), [`blob.rs`](../src/swarm/blob.rs) | 1,500 | Pure algorithms with tests; the topology hashes each member once, then scores the N² pairs by cheap mixing. |
| [`api/`](../src/api/) | 3,600 | Handlers; the Prometheus rendering is the longest file. The dashboard's page ([`dashboard.html`](../src/api/dashboard/dashboard.html), 2,000 more) is one file of HTML, CSS and script. |