From a803177f8bc636eedbe31fda735532e48698bd91 Mon Sep 17 00:00:00 2001 From: Jean Date: Tue, 14 Jul 2026 14:28:18 +0000 Subject: [PATCH] Nest the ircd link under modules/protocol/ The protocol link is a different kind of module from the service pseudo-clients, so give it its own home: modules/inspircd -> modules/protocol/inspircd. A future ircd link is a new crate alongside it. Workspace member, dependency path, the crate's own api path, and the docs are updated to match. No code change. --- Cargo.toml | 4 ++-- MODULES.md | 7 ++++--- README.md | 7 ++++--- modules/{ => protocol}/inspircd/Cargo.toml | 2 +- modules/{ => protocol}/inspircd/src/lib.rs | 0 5 files changed, 11 insertions(+), 9 deletions(-) rename modules/{ => protocol}/inspircd/Cargo.toml (79%) rename modules/{ => protocol}/inspircd/src/lib.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 2e8a3bb..dd23934 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ # pseudo-clients and the ircd protocol link — live under modules/. members = [ "api", - "modules/inspircd", + "modules/protocol/inspircd", "modules/chanserv", "modules/nickserv", "modules/example", @@ -28,7 +28,7 @@ description = "Federated IRC services daemon (protocol-agnostic core, InspIRCd l [dependencies] fedserv-api = { path = "api" } -fedserv-inspircd = { path = "modules/inspircd" } +fedserv-inspircd = { path = "modules/protocol/inspircd" } fedserv-chanserv = { path = "modules/chanserv" } fedserv-nickserv = { path = "modules/nickserv" } fedserv-example = { path = "modules/example" } diff --git a/MODULES.md b/MODULES.md index 081808b..ab89c46 100644 --- a/MODULES.md +++ b/MODULES.md @@ -12,7 +12,7 @@ There are two kinds of module. - A **protocol** (an ircd link like InspIRCd) implements `Protocol`. Both live in their own crate under `modules/`. `modules/example/` is a complete, -minimal service to copy from; `modules/inspircd/` is the reference protocol. +minimal service to copy from; `modules/protocol/inspircd/` is the reference protocol. ## A service, end to end @@ -107,8 +107,9 @@ ignored. A protocol crate implements `Protocol`: it turns raw server-to-server lines into the normalized `NetEvent`s the engine understands, and turns the engine's `NetAction`s back into raw lines. The engine never sees a raw line, so supporting -another ircd is one new crate — see `modules/inspircd/`. Wire it in `src/main.rs` where -`InspIrcd` is constructed. +another ircd is one new crate under `modules/protocol/` — see +`modules/protocol/inspircd/`. Wire it in `src/main.rs` where `InspIrcd` is +constructed. ## What the SDK deliberately does not give you diff --git a/README.md b/README.md index 3a41ee9..92a2691 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,10 @@ workspace, each depending only on the `fedserv-api` SDK crate. - **`src/gossip.rs`** node-to-node replication over the logs. - **`modules/`** the loadable modules, each its own crate depending only on the `fedserv-api` SDK: - - **`modules/inspircd/`** (`fedserv-inspircd`) the ircd link layer. A `Protocol` - impl maps raw server-to-server lines to and from the normalized model, so the - engine never touches a raw line and a new ircd is one new crate. + - **`modules/protocol/inspircd/`** (`fedserv-inspircd`) the ircd link layer. A + `Protocol` impl maps raw server-to-server lines to and from the normalized + model, so the engine never touches a raw line and a new ircd is one new crate + under `modules/protocol/`. - **`modules/nickserv/`, `modules/chanserv/`, `modules/botserv/`, `modules/memoserv/`, `modules/statserv/`, `modules/hostserv/`, `modules/operserv/`** and diceserv, infoserv, reportserv, groupserv, chanfix, helpserv — the diff --git a/modules/inspircd/Cargo.toml b/modules/protocol/inspircd/Cargo.toml similarity index 79% rename from modules/inspircd/Cargo.toml rename to modules/protocol/inspircd/Cargo.toml index 748e6b9..4bf04fc 100644 --- a/modules/inspircd/Cargo.toml +++ b/modules/protocol/inspircd/Cargo.toml @@ -5,4 +5,4 @@ edition = "2021" description = "InspIRCd server-to-server protocol module for fedserv." [dependencies] -fedserv-api = { path = "../../api" } +fedserv-api = { path = "../../../api" } diff --git a/modules/inspircd/src/lib.rs b/modules/protocol/inspircd/src/lib.rs similarity index 100% rename from modules/inspircd/src/lib.rs rename to modules/protocol/inspircd/src/lib.rs