Skip to content

refactor: reorganize src/ into internal/{codec,protocol} with clear header-only vs header+cpp split - #21

Merged
petesramek merged 1 commit into
mainfrom
copilot/organize-internal-files
Mar 23, 2026
Merged

petesramek merged 1 commit into
mainfrom
copilot/organize-internal-files

Conversation

Copilot AI commented Mar 23, 2026

Copy link
Copy Markdown
Contributor

Packet, CobsCodec, and Fletcher16 were internal implementation details sitting at the src/ root alongside public headers. The existing src/protocol/internal/ nesting was also inverted — internal should be the top-level category.

Changes

  • src/internal/codec/ — moved Packet, CobsCodec, and Fletcher16 (the only files with .cpp implementations) here
  • src/internal/protocol/ — moved wire-format headers (AckMessage, HandshakeMessage, LogMessage, Packed) from src/protocol/internal/ here, flattening the inverted nesting
  • Updated all #include paths in TinyLink.h, the moved headers, TinyProtocol.h comments, and all test files

Resulting layout

src/
├── TinyLink.h / TinyProtocol.h / version.h   ← public
├── protocol/                                  ← public, header-only
├── adapters/                                  ← public, header-only
└── internal/
    ├── codec/       ← header + cpp (CobsCodec, Fletcher16, Packet)
    └── protocol/    ← header-only wire formats (AckMessage, HandshakeMessage, LogMessage, Packed)

The internal/ boundary is now the single, top-level marker for implementation details, with codec/ vs protocol/ distinguishing the two internal concerns.

@petesramek
petesramek marked this pull request as ready for review March 23, 2026 10:58
@petesramek
petesramek merged commit bbd0a53 into main Mar 23, 2026
4 checks passed
@petesramek
petesramek deleted the copilot/organize-internal-files branch March 23, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants