modules: split services and the ircd link into external crates

nickserv, chanserv and the InspIRCd protocol move out of the binary into their
own workspace crates (fedserv-nickserv, fedserv-chanserv, fedserv-inspircd),
each depending only on fedserv-api. human_time and the branded account emails
move into the SDK crate so a module needs nothing from core; the engine keeps
its own inherent methods and builds emails via fedserv-api too. The bin now
constructs each module from its crate instead of an in-tree #[path] include.
Proves the SDK is self-sufficient: a third-party module is the same shape.
This commit is contained in:
Jean Chevronnet 2026-07-13 01:33:56 +00:00
parent 8ed1a9ab70
commit 596630df53
No known key found for this signature in database
52 changed files with 197 additions and 162 deletions

View file

@ -1,26 +1,22 @@
// Core lives in src/; pluggable modules live in ../modules/.
// Core lives in src/; the pseudo-clients and the ircd link are external module
// crates (fedserv-nickserv, fedserv-chanserv, fedserv-inspircd), each depending
// only on the fedserv-api SDK.
mod config;
mod email;
mod engine;
mod gossip;
mod grpc;
mod link;
#[path = "../modules/protocol/mod.rs"]
mod proto;
#[path = "../modules/nickserv/nickserv.rs"]
mod nickserv;
#[path = "../modules/chanserv/chanserv.rs"]
mod chanserv;
use anyhow::Result;
use std::sync::Arc;
use std::time::{SystemTime, UNIX_EPOCH};
use tokio::sync::Mutex;
use chanserv::ChanServ;
use engine::Engine;
use nickserv::NickServ;
use proto::inspircd::InspIrcd;
use fedserv_chanserv::ChanServ;
use fedserv_inspircd::InspIrcd;
use fedserv_nickserv::NickServ;
#[tokio::main]
async fn main() -> Result<()> {