Skip to content

RUST-REF-005: Decompose oversized Rust modules #7

Description

@itlezy

Objective

Decompose mixed-responsibility Rust source and test modules by subsystem and stable boundary, beginning with emulebb-core/src/lib.rs, while preserving public APIs, REST contracts, protocol behavior, persistence, and VPN fail-closed enforcement.

Source length is an advisory maintainability signal, not a validation limit. Cohesive files do not need allowlist entries or written size exceptions.

Delivery

  • Move code in small behavior-preserving commits.
  • Add focused modules when a change introduces an independently nameable responsibility.
  • Keep small white-box tests beside private helpers when proximity helps; move substantial suites to sibling test modules or integration-test trees.
  • Use non-failing checker advisories to focus responsibility reviews.
  • Remove only compiler-proven private dead code and unused dependencies.
  • Do not require broad prerequisite refactors for focused behavior changes.

Acceptance

  • emulebb-core/src/lib.rs becomes a thin crate root with stable re-exports.
  • Substantial tests are grouped outside production modules without changing assertions or coverage.
  • Static IPv4 and P2P binding audits follow moved boundaries.
  • No source or test file fails policy solely because of line count.
  • Workspace format, Clippy, tests, Kad swarm, and VPN leak gates remain green.
  • Each coherent extraction is committed and pushed independently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions