History log of /tonic/tonic/src/codec/mod.rs (Results 1 – 25 of 26)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v0.12.3
# 3c900ebd 26-Sep-2024 Dirkjan Ochtman <[email protected]>

Clean up EncodeBody API (#1924)

* tonic: remove unnecessary bounds in codec::encode

* tonic: reduce unnecessary visibility for EncodedBytes

* tonic: use EncodedBytes directly in EncodeBody

* toni

Clean up EncodeBody API (#1924)

* tonic: remove unnecessary bounds in codec::encode

* tonic: reduce unnecessary visibility for EncodedBytes

* tonic: use EncodedBytes directly in EncodeBody

* tonic: handle fuse() inside EncodedBytes

* tonic: fold encode_server() into EncodeBody::new_server()

* tonic: move mapping responsibility to caller

* tonic: fold encode_client() into EncodeBody::new_client()

show more ...


# 0964cb24 02-Sep-2024 Zak Henry <[email protected]>

feat(grpc-web): make public codec methods to enable grpc-web client and generic IPC proxying (#1884)

Co-authored-by: Zak Henry <[email protected]>


Revision tags: v0.12.2
# c8754f3a 19-Aug-2024 bytetigers <[email protected]>

chore: fix some comments (#1869)

Signed-off-by: bytetigers <[email protected]>


Revision tags: v0.12.1, v0.12.0
# 911ce6c4 21-Jun-2024 tottoto <[email protected]>

chore(doc): Enable doc_auto_cfg (#1742)


# 18a2b309 20-Feb-2024 Kenny <[email protected]>

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

* 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

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

* 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.

* replace threadlocal with service wrapper

* pull back ProstEn/Decoder, clean up other comments

* clippy and fmt

* feedback, clean up straggler changes

show more ...


Revision tags: v0.11.0, v0.10.2, v0.10.1, v0.10.0, v0.9.2, v0.9.1, v0.9.0
# ff331199 30-Mar-2023 Lucio Franco <[email protected]>

feat(core): Default encoding/decoding limits (#1335)

* feat(core): Default encoding/decoding limits

This PR adds new defaults for both client and server max
encoding/decoding message size limits. B

feat(core): Default encoding/decoding limits (#1335)

* feat(core): Default encoding/decoding limits

This PR adds new defaults for both client and server max
encoding/decoding message size limits. By default, the max message
decoding size is `4MB` and the max message encoding size is
`usize::MAX`.

This is follow up work from https://github.com/hyperium/tonic/pull/1274

BREAKING: Default max message encoding/decoding limits

* update generated code

show more ...


# 9f716d84 17-Feb-2023 Moncef AOUDIA <[email protected]>

feat(codec): Configure max request message size (#1274)

* feat(codec): add max_message_size parameter

resolves #1097

* refactor(client): add max size parameters

* refactor(tonic-build): update se

feat(codec): Configure max request message size (#1274)

* feat(codec): add max_message_size parameter

resolves #1097

* refactor(client): add max size parameters

* refactor(tonic-build): update server gen template

* refactor(tonic-build): update client template

* fix(tonic-build): update client template

* fix(tonic-build): small typo in server.rs

* fix(tonic-build): client.rs generator

* fix(tonic): add apply max message setting size to server

* fix(test): wrong message size

* fix: doctest + generated rs

show more ...


Revision tags: v0.8.4, v0.8.3, v0.8.2, v0.8.1, v0.8.0
# a585a722 13-Jun-2022 Marcus Griep <[email protected]>

feat!: remove codegen dependency on compression feature (#1004)


Revision tags: v0.7.2, v0.7.1, v0.7.0
# d574cfda 24-Jan-2022 Andrew Hickman <[email protected]>

fix(codec): Remove `Default` bound on `Codec` (#894)


Revision tags: v0.6.2, v0.6.1, v0.6.0
# 23c1392f 25-Oct-2021 Lucio Franco <[email protected]>

fix(tonic): Remove `Sync` requirement for streams (#804)


Revision tags: v0.5.2, v0.5.1, v0.5.0
# 0583cff8 02-Jul-2021 David Pedersen <[email protected]>

feat(codec): compression support (#692)

* Initial compression support

* Support configuring compression on `Server`

* Minor clean up

* Test that compression is actually happening

* Clean

feat(codec): compression support (#692)

* Initial compression support

* Support configuring compression on `Server`

* Minor clean up

* Test that compression is actually happening

* Clean up some todos

* channels compressing requests

* Move compression to be on the codecs

* Test sending compressed request to server that doesn't support it

* Clean up a bit

* Compress server streams

* Compress client streams

* Bidirectional streaming compression

* Handle receiving unsupported encoding

* Clean up

* Add note to future self

* Support disabling compression for individual responses

* Add docs

* Add compression examples

* Disable compression behind feature flag

* Add some docs

* Make flate2 optional dependency

* Fix docs wording

* Format

* Reply with which encodings are supported

* Convert tests to use mocked io

* Fix lints

* Use separate counters

* Don't make a long stream

* Address review feedback

show more ...


Revision tags: v0.4.3, v0.4.2, v0.4.1, v0.4.0, v0.3.1, v0.3.0, v0.2.1, v0.2.0
# 3cba9f5f 30-Mar-2020 Lucio Franco <[email protected]>

chore: Fix feature flags and build docs (#311)

Signed-off-by: Lucio Franco <[email protected]>


# f65cda1e 01-Mar-2020 Gyusun Yeom <[email protected]>

feat(build): Decouple codgen from `prost` (#170)


Revision tags: v0.1.1, v0.1.0
# 0fa2bf1c 13-Jan-2020 Juan Alvarez <[email protected]>

feat(codec): Introduce `Decoder/Encoder` traits (#208)

BREAKING CHANGE: Add new `Decoder/Encoder` traits and use `EncodeBuf/DecodeBuf` over `BytesMut` directly.


Revision tags: v0.1.0-beta.1
# 3387ef90 06-Dec-2019 Lucio Franco <[email protected]>

Upgrade to `tokio 0.2` (#163)


Revision tags: v0.1.0-alpha.5
# 3ce61d98 30-Oct-2019 Lucio Franco <[email protected]>

fix(codec): Enforce encoders/decoders are `Sync` (#84)

Closes #81


# a17049f1 29-Oct-2019 Lucio Franco <[email protected]>

fix(codec): Remove custom content-type (#104)

This removes custom content-types in favor of
just using `application/grpc`. There is some
confusion around the specification but most
grpc implemen

fix(codec): Remove custom content-type (#104)

This removes custom content-types in favor of
just using `application/grpc`. There is some
confusion around the specification but most
grpc implementations ignore the `+` and
anything after.

show more ...


Revision tags: v0.1.0-alpha.4, v0.1.0-alpha.3, v0.1.0-alpha.2
# ed3e7e95 04-Oct-2019 Lucio Franco <[email protected]>

fix(codec): Fix buffer decode panic on full (#43)

* fix(codec): Fix buffer decode panic on full

This is a naive fix for the buffer growing beyond capacity
and producing a panic. Ideally we shoul

fix(codec): Fix buffer decode panic on full (#43)

* fix(codec): Fix buffer decode panic on full

This is a naive fix for the buffer growing beyond capacity
and producing a panic. Ideally we should do a better job
of not having to allocate for new messages by using
a link list.

* fmt

show more ...


# bee8acd8 01-Oct-2019 Lucio Franco <[email protected]>

more readme updates


# 80e2771a 25-Sep-2019 Lucio Franco <[email protected]>

fmt and docs


# 031fcc90 04-Sep-2019 Lucio Franco <[email protected]>

Add docs to codec and server


# f750dfa1 28-Aug-2019 Lucio Franco <[email protected]>

Fix interoptests and rewrite decode


# 132d2523 21-Aug-2019 Lucio Franco <[email protected]>

More encoder clean up


# 93eb9989 21-Aug-2019 Lucio Franco <[email protected]>

Fix encoding, more interop and update nightly version


# 4835be51 18-Aug-2019 Lucio Franco <[email protected]>

Check response trailers


12