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 .

RepositoryRelease v2.0.0Epic swarm-core#3API policy

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.

Directories of swarm-routing/swarm-core
PathWhatLicenceState
core/the ports and primitives, the router observer; the CMake package swarm-coreMIT OR GPL-2.0-onlypresent
core/testbench/discrete-event testbench for protocol cores' tests (header-only)MIT OR GPL-2.0-onlypresent
core/test/the core tests and the consumer builds (find_package, the release tarball)MIT OR GPL-2.0-onlypresent
core/bench/dev-only microbenchmarksMIT OR GPL-2.0-onlypresent
tools/checks (the consumer build, the C++ standard, the API record), bench comparison, release (dist.sh)MIT OR GPL-2.0-onlypresent
docs/api-policy.md, api-surface.txt (the API record), development.md, adr/, rcapa/, references.bibMIT OR GPL-2.0-onlypresent

Where it sits in the colony

The swarm-routing organisation: who depends on whomDependency graph of the swarm-routing organisation, in the colony map's six regions: Protocols on top (AntHocNet, ARA, BeeAdHoc, Termite, HOPNET, and the deferred POSANT, BeeSensor and Q-Swarm); Core (swarm-core) and Adapters (swarm-adapter-ns3, and the deferred swarm-routingd and swarm-adapter-omnet) below them; then Infra (vcpkg-registry, benchmarks, the deferred swarm-web-ui, sim-containers, sim-tools); Others (this site, ns3-upstream-report, .github) and AI (swarm-mcp, skills) at the bottom. The five released protocols link the ns-3 module of swarm-adapter-ns3, which builds on swarm-core's release, and register as arms in sim-tools (AntHocNet runs its benchmarks on its harness); swarm-routingd and swarm-adapter-omnet will use swarm-core's ports; vcpkg-registry ports swarm-core; swarm-adapter-ns3 and sim-tools build and run inside the sim-containers images, where swarm-web-ui will run scenarios too; sim-tools writes verdicts into benchmarks; ns3-upstream-report carries sim-tools' register of ns-3 bugs upstream; the Colony Arena site builds AntHocNet's core to WebAssembly and will render the benchmarks leaderboard; the .github repository's reusable CI runs inside the sim-containers images; swarm-mcp, the org's MCP server, runs the .github repository's scripts, and the skills plugin bundles it.ProtocolsCoreAdaptersInfraOthersAIlinkslinkslinkslinkslinksarmbenchbuilds inruns inverdictscore/ → WASMleaderboard (planned)CI imagesruns its scriptsbundlesbuilds onportsruns in (planned)registerAntHocNetprotocol · liveARAprotocolBeeAdHocprotocolTermiteprotocolHOPNETprotocolPOSANTprotocol · deferredBeeSensorprotocol · deferredQ-Swarmprotocol · deferredswarm-coreports · primitivesswarm-adapter-ns3module swarm-coreswarm-routingdLinux daemon · deferredswarm-adapter-omnetOMNeT++ · deferredvcpkg-registryports of the coresbenchmarksdatasets · verdictsswarm-web-uiworkbench · deferredsim-containersns3-dev imagessim-toolsharness · readersColony Arenathis sitens3-upstream-reportbridge to ns-3.githubreusable CI · templatesswarm-mcpMCP server · read-onlyskillsagent skills · plugindashed arrow: «use» dependency (UML); highlighted: this project and its neighbours
swarm-core and its neighbours in the organisation.

Quests

The repository's epics and their sub-issues, as the issues stood on 2026-11-30: 9 of 17 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
DOI
10.5281/zenodo.24476619
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

Sources

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).