Skip to content

feat(protobuf): improve ergonomics by combining decoding and verification - #3857

Merged
Mirko-von-Leipzig merged 6 commits into
nextfrom
feat/protobuf-decode-helpers
Sep 14, 2026
Merged

Mirko-von-Leipzig merged 6 commits into
nextfrom
feat/protobuf-decode-helpers

Conversation

@Mirko-von-Leipzig

Copy link
Copy Markdown
Contributor

Users of the miden-protobuf types have to do a repetitive dance of:

message
  .decode_fields()
  .map_err(..)
  .verify()
  .map_err(..)?

This PR adds an extension trait DecodeMessageExt which provides the decode_and_verify(), decode_and_verify_with(), and decode_and_build_unchecked() methods via blanket impls where appropriate.

This is an ergonomic improvement.

@kkovaacs kkovaacs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@zeapoz zeapoz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Left a tiny nit about the changelog entry.

Comment thread CHANGELOG.md Outdated
@Mirko-von-Leipzig
Mirko-von-Leipzig added this pull request to the merge queue Sep 14, 2026
Merged via the queue into next with commit 776cd2c Sep 14, 2026
19 checks passed
@Mirko-von-Leipzig
Mirko-von-Leipzig deleted the feat/protobuf-decode-helpers branch September 14, 2026 09:37
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.

3 participants