Brood cells · Library · swarm-routing/swarm-core
swarm-core
The simulator-free C++23 ports and primitives every protocol core builds on: layer 1 of the org's four.
Unlocked: v2.2.0 released, 1 epic in progress, 1 planned Computed from its 2 epics · release v2.2.0, as they stood on .
What it does
swarm-core is layer 1 of the org's hexagonal layout: the pure C++23 ports and primitives every protocol's simulator-free core/ builds on. The ports bring in time, randomness, neighbours, timers, link state and quality, link metrics and energy (IClock, IRng, INeighborProvider, ITimerScheduler, ILinkState, ILinkQuality, ILinkMetric, IEnergy); the primitives are the bounded VisitedPath and DedupHistory, the little-endian wire helpers, PheromoneTable, RouteDecision, evaporation and roulette selection, and the router observer. core/testbench/ is a discrete-event testbench for protocol cores' own tests. No OS or simulator header.
Extracted with its history from swarm-adapter-ns3's core/ (ROADMAP phase 1) and released here as v2.0.0 (2026-11-23): its release asset carries core/ alone, a CMake project that installs the package swarm-core (target swarm::core), with no ns-3 module, which now ships from swarm-adapter-ns3. A protocol's core/ fetches that tarball with SOURCE_SUBDIR core or finds the installed package; swarm-adapter-ns3 v2.0.0 builds on it and passes it on to every ns-3 module that links ${libswarm-core}; the release also feeds the swarm-core port of the org's vcpkg registry. CI checks core/ alone: build, tests, ASan + UBSan, format and the consumer builds (core), its C++ standard against the ns3-dev image's ns-3 minimum (cxx-standard), and its API record (api-surface).
Planned under its epic (swarm-core#3, swarm-routing/.github#672): the rest of the layer-1 contract, the ports ITransport, IRouteTable, IEnergyProvider, ILocationProvider and ILinkMetrics, the 4-byte common wire envelope (magic, protocol_id, version, flags) and the header-only ProtocolContractTest suite.
Diagrams
No diagram of its own yet. Where it sits in the colony is drawn below.
Package structure
The repository's layout, its licence per directory (LICENSING.md) and what exists today.
| Path | What | Licence | State |
|---|---|---|---|
core/ | the ports and primitives, the router observer; the CMake package swarm-core | MIT OR GPL-2.0-only | present |
core/testbench/ | discrete-event testbench for protocol cores' tests (header-only) | MIT OR GPL-2.0-only | present |
core/test/ | the core tests and the consumer builds (find_package, the release tarball) | MIT OR GPL-2.0-only | present |
core/bench/ | dev-only microbenchmarks | MIT OR GPL-2.0-only | present |
tools/ | checks (the consumer build, the C++ standard, the API record), bench comparison, release (dist.sh) | MIT OR GPL-2.0-only | present |
docs/ | api-policy.md, api-surface.txt (the API record), development.md, adr/, rcapa/, references.bib | MIT OR GPL-2.0-only | present |
Where it sits in the colony
Quests
The repository's epics and their sub-issues, as the issues stood on 2026-11-30: 9 of 17 sub-issues closed.
- #3 Extract swarm-core (C++23 ports, the daemon's 4-byte wire envelope, ProtocolContractTest) & release v1.0.0
In progress · 9 / 12 sub-issues closed - #62 swarm-core 3.0.0: the host contract, so a protocol core runs on any host
Planned · 0 / 5 sub-issues closed
Cite this project
Using swarm-core in a paper? Cite the project as below, and the works it rests on from its references.
Text
Joppi, Daniel Henrique (n.d.). swarm-core (version 2.2.0) [Computer software]. https://doi.org/10.5281/zenodo.24476619
BibTeX
@software{swarmcore,
author = {Joppi, Daniel Henrique},
title = {swarm-core},
version = {2.2.0},
doi = {10.5281/zenodo.24476619},
url = {https://github.com/swarm-routing/swarm-core}
}- Version
- 2.2.0
- Author
- Daniel Henrique Joppi · ORCID
- Licence
- MIT, GPL-2.0-only
Read from CITATION.cff at main when this site was built.
References
The 1 work docs/references.bib lists, read at main when this site was built. Each links its DOI; a work with none links its publisher's or institution's page.
Background
- Joppi, swarm-adapter-ns3: the ns-3 adapter of swarm-core, Zenodo, 2026. DOI 10.5281/zenodo.24138628
Sources
- swarm-core AGENTS.md at v2.0.0: what the repository is, its checks, the plan
- swarm-core CHANGELOG.md at v2.0.0: the release asset carries core/ alone
- swarm-core release v2.0.0: the release notes (core/ alone, the ns-3 module moved)
- swarm-core core/ at v2.0.0: the headers of each primitive
- swarm-core LICENSING.md
The status and the quests come from the repository's issues and releases (2026-11-30); the other
facts on this page are kept by hand from its AGENTS.md (as of 2026-11-08).