Skip to content

services depends on relay, a backwards edge — move WotGraph and RelayKeySource into nostream-core #1207

Open

Description

@chappie-daemon

Measured on rewrite/main at ff045445: crates/nostream-services/Cargo.toml:13 declares nostream-relay.workspace = true. Services is the higher layer, so the edge points backwards — and it exists for four unrelated things: the WotGraph trait, RelayKeySource, a relay event-deletion strategy, and a transport helper.

The cost is not today's compile; it is that the first time relay needs anything from services the graph is a cycle, and the fix at that point is a crate split rather than a move.

The fix is cheap now: move WotGraph and RelayKeySource (and the drain-timeout helper) down into nostream-core, where both layers can depend on them, and delete the nostream-relay dependency from nostream-services.

Acceptance:

  • crates/nostream-services/Cargo.toml no longer depends on nostream-relay.
  • The traits live in nostream-core with the doc comments they carry today, and both crates import them from there.
  • cargo tree -p nostream-services shows no path back into nostream-relay, asserted in CI rather than checked by hand.

Activity

  1. added
    rewrite
    rust
    on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    rewriterust

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions