You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@fory.apache.org by Peiyang He via dev <de...@fory.apache.org> on 2026/03/25 11:11:52 UTC
[GSOC-320] Design question: codec helper files v.s. separate crate
Hi Shawn, I came across issue #3266
<https://github.com/apache/fory/issues/3266>, which documents a more
detailed design plan for the gRPC integration. I noticed one point in
particular (Decision #4): "Ship small, generated helper files instead of
a separate fory-grpc module."
Taking Rust as an example. In my current design, the generated client
and server stubs call codec logic implemented by Fory for serialization
and deserialization. In Rust, this codec is implemented by providing
implementations of certain traits defined by tonic. Since this codec
logic is shared across all generated service files, I planned to
implement it as a new crate under the rust/ directory.
I am wondering whether this design conflicts with Decision #4. Should
the codec logic be generated alongside the service code rather than
defined as a separate crate?
Thanks for your time and reply!
Re: [GSOC-320] Design question: codec helper files v.s. separate crate
Posted by Shawn Yang <sh...@gmail.com>.
If code is small, generate it directly. If codex logis is huge, then
it may deserve a separate crate
On Wed, Mar 25, 2026 at 7:12 PM Peiyang He via dev <de...@fory.apache.org> wrote:
>
> Hi Shawn, I came across issue #3266
> <https://github.com/apache/fory/issues/3266>, which documents a more
> detailed design plan for the gRPC integration. I noticed one point in
> particular (Decision #4): "Ship small, generated helper files instead of
> a separate fory-grpc module."
>
> Taking Rust as an example. In my current design, the generated client
> and server stubs call codec logic implemented by Fory for serialization
> and deserialization. In Rust, this codec is implemented by providing
> implementations of certain traits defined by tonic. Since this codec
> logic is shared across all generated service files, I planned to
> implement it as a new crate under the rust/ directory.
>
> I am wondering whether this design conflicts with Decision #4. Should
> the codec logic be generated alongside the service code rather than
> defined as a separate crate?
>
> Thanks for your time and reply!
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@fory.apache.org
For additional commands, e-mail: dev-help@fory.apache.org