Module: Shared

Module: FirelandsShared (src/shared)

FirelandsShared is the lowest-level static library used by every other target. It holds cross-cutting utilities that must not depend on game services or persistence.

Responsibilities

AreaPathPurpose
Configshared/Config.{h,cpp}YAML via yaml-cpp; env overrides FIRELANDS_AUTH_CONFIG / FIRELANDS_WORLD_CONFIG
Loggingshared/Logger.hspdlog wrapper — always include via this header
Networkingshared/network/ByteBuffer, WorldPacket, opcodes, wire codecs, WorldCrypt.h
Crypto / SRPshared/Crypto.h, SRPConstants.h, BigInt.hSRP-6a math for authentication
DBCshared/dbc/DbcReader.cppClient .dbc-style binary table reader
Game helpersshared/game/Access levels, permissions, GM appearance, experience tables
TUIshared/tui/FTXUI helpers for interactive consoles

CMake

Defined in src/shared/CMakeLists.txt. Links OpenSSL, spdlog, nlohmann_json, yaml-cpp.

Compiled sources today include Config.cpp, network/SpellCastWire.cpp, dbc/DbcReader.cpp; many headers are header-only.

When to add code here

Add to shared only when:

  • Multiple layers need the same utility
  • The code has no MariaDB, Boost.Asio session, or domain aggregate dependency
  • It is genuinely cross-cutting (wire format, config, logging, crypto)