planetscale / planetscale/vtprotobuf

Make proto.Marshal use MarshalVT under the hood

Open
#3 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
1.1k
Forks
112
PR merge metrics
No merged PRs in 30d

Description

This fast-marshaling is cool, but I would like to avoid having the VT suffix in my codebase, and would like to simply continue using proto.Marshal(...).

I read that protoreflect's Message supports an optional ProtoMethods method, and quoting the docs:

ProtoMethods returns optional fast-path implementions of various operations.

Is there a way vtprotobuf's fast-marshaling could be added to those methods, instead of new (Un)MarshalVT methods?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the protoreflect.Message and ProtoMethods documentation linked in the issue, then inspect the repository's generated marshaling entry points. Determine whether the fast path can be exposed through those methods while preserving the existing API; done requires a clear implementation plan and tests showing proto.Marshal uses the optimized path.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.