Skip to content

CLI binary-split regression: publisher links cache crate (iroh-blobs/AWS SDK) #578

Closed

Description

@thiras

Summary

The decdn publisher CLI transitively links the entire cache crate (iroh-blobs, AWS S3 SDK, reqwest, async-compression), directly defeating the documented binary-split goal.

Detail

Documented dependency flow is cli → common, protocol, and crates/cli/Cargo.toml:18-20 cites appendix-binaries.md: "keeps iroh-blobs out of the publisher CLI's dep tree." But:

  • crates/common/Cargo.toml declares decdn-cache = { workspace = true }
  • consumed at crates/common/src/config/types.rs:159, resolved.rs:87-127, admin.rs:24 (reusing RetryPolicy, DecompressMode, OriginUrl/OriginKind, Hash, PinnedHashes in the config schema)

Since cli → common → cache, decdn statically links the heavy storage/network stack. crates/common/src/admin.rs:18 acknowledges the coupling as already-existing rather than questioning it.

Suggested fix

Extract the config-vocabulary types the schema needs (RetryPolicy, DecompressMode, OriginUrl/OriginKind, a Hash newtype) into decdn-protocol (the true leaf) or a new tiny decdn-config-types leaf crate; have decdn-cache re-export them. Then common depends only on the leaf and cli no longer pulls iroh-blobs/AWS SDK.

If the coupling is intentional, amend appendix-binaries.md / architecture.md to drop the binary-size claim so docs and code stop contradicting.

Filed from a repository review.

Activity

  1. self-assigned this
    on May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions