Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(build): Custom codecs for generated code #1599

Merged
merged 5 commits into from
Feb 20, 2024

Commits on Feb 8, 2024

  1. feat(tonic): Custom codecs for generated code

    Broadly, this change does 2 things:
    1. Allow the built-in Prost codec to have its buffer sizes customized
    2. Allow users to specify custom codecs on the tonic_build::prost::Builder
    
    The Prost codec is convenient, and handles any normal use case. However,
    the buffer sizes today are too large in some cases - and they may grow too
    aggressively. By exposing BufferSettings, users can make a small custom
    codec with their own BufferSettings to control their memory usage - or give
    enormous buffers to rpc's, as their use case requires.
    
    While one can define a custom service and methods with a custom codec today
    explicitly in Rust, the code generator does not have a means to supply a
    custom codec. I've reached for .codec... on the tonic_build::prost::Builder
    many times and keep forgetting it's not there. This change adds .codec_path
    to the Builder, so people can simply add their custom buffer codec or even
    their own full top level codec without reaching for manual service definition.
    kvcache committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    59adbdc View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2024

  1. Configuration menu
    Copy the full SHA
    1da0710 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2024

  1. Configuration menu
    Copy the full SHA
    a289397 View commit details
    Browse the repository at this point in the history
  2. clippy and fmt

    kvcache committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    d67ee7a View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2024

  1. Configuration menu
    Copy the full SHA
    6176e9a View commit details
    Browse the repository at this point in the history