Skip to content

Allow selecting Zcash registry codecs without unrelated formats - #143

Open
ValarDragon wants to merge 2 commits into
KeystoneHQ:masterfrom
valargroup:maintenance/registry-features-upstream
Open

ValarDragon wants to merge 2 commits into
KeystoneHQ:masterfrom
valargroup:maintenance/registry-features-upstream

Conversation

@ValarDragon

Copy link
Copy Markdown

ur-registry compiles every chain format and its protobuf, compression, and UR encoder dependencies even when a consumer uses only the Zcash CBOR codecs. Add opt-in format selection while preserving existing configurations.

Existing core (including the default) and std selections still enable the full registry API. The new std-base + zcash configuration builds only common registry support and the original Zcash codecs; ur-encoder adds the optional encoding convenience trait. Feature unions remain additive: a consumer requesting std, core, or all-chains restores the full API. core-base provides the corresponding no-std support without selecting all formats.

The Zcash codec implementations and wire encodings are unchanged. CI now runs the minimal and legacy std configurations in addition to the existing workspace tests. Public API changes are the five new features (core-base, std-base, all-chains, zcash, ur-encoder) and format/UR-trait availability in the new restricted configurations; existing configurations retain their public modules and trait implementations.

Validation with Rust 1.98.0:

  • Minimal std-base,zcash: 65 tests passed.
  • Existing --no-default-features --features std: 161 tests passed.
  • Existing defaults plus std: 161 tests passed.
  • std-base,zcash,ur-encoder: library check passed.
  • ur-registry-ffi with ur-registry/std: check passed.
  • git diff --check passed.

Consumer diagnostics on the unchanged 1.0.5 Zcash codec backport remove 12 transitive runtime packages and two build-only packages. Its library LLVM IR falls from 225,245 to 20,713 lines. These measurements describe the downstream backport, not an upstream workspace-wide performance claim.

This is independent of #142, which removes the existing unused prost-build declaration.

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.

1 participant