Skip to content

Move remaining impure modules (enrichment, compress, diagnostics) #266

Closed

Description

@strawgate

Summary

Move remaining IO/external-dep modules out of logfwd-core to their natural homes.

What moves where

Module Lines Destination Why
enrichment.rs 972 logfwd-transform Arrow + gethostname + CSV IO
compress.rs 206 logfwd-output zstd crate
diagnostics.rs 864 logfwd (binary) HTTP server, threads, OTel

Steps

  1. Move enrichment.rs to logfwd-transform (already depends on Arrow)
  2. Move compress.rs to logfwd-output (already uses it for OTLP compression)
  3. Move diagnostics.rs to logfwd binary crate (already owns the server)
  4. Update all imports, add re-exports where needed
  5. All existing tests pass

Dependencies

Depends on #Phase1a and #Phase1b landing first.

Assignability

Copilot-assignable — mechanical moves with clear destinations.

Parent: #262

Activity

  1. strawgate commented on Mar 31, 2026

    @strawgate
    OwnerAuthor

    @copilot Steps 1 and 2 are landing. You can work on this after Step 2 merges.

    Move remaining impure modules out of logfwd-core:

    1. Move crates/logfwd-core/src/enrichment.rs → crates/logfwd-transform/src/enrichment.rs

      • Update imports: use crate::enrichment → use logfwd_core::enrichment or inline
      • Add pub mod enrichment; to logfwd-transform's lib.rs
      • Remove from logfwd-core's lib.rs
      • Update all callers
    2. Move crates/logfwd-core/src/compress.rs → crates/logfwd-output/src/compress.rs

      • Same pattern
      • Remove zstd dep from logfwd-core if no longer needed
    3. Move crates/logfwd-core/src/diagnostics.rs → crates/logfwd/src/diagnostics.rs

      • Remove tiny_http and opentelemetry deps from logfwd-core if no longer needed

    After all moves, logfwd-core should only have these deps: arrow, bytes, memchr, serde
    (arrow and bytes will be removed later when we go no_std)

    cargo test and cargo clippy -- -D warnings must pass.

  2. changed the title [-]Phase 1c: Move remaining impure modules (enrichment, compress, diagnostics)[/-] [+]Move remaining impure modules (enrichment, compress, diagnostics)[/+] on Mar 31, 2026
  3. strawgate commented on Apr 1, 2026

    @strawgate
    OwnerAuthor

    Closing — enrichment.rs, compress.rs, and diagnostics.rs have been moved to logfwd-io crate. logfwd-core is now #![no_std] with no impure modules remaining.

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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions