169 Commits

Author SHA1 Message Date
Auri 4942dd4a43 tonic-build: option to emit Arc<Self> as server receiver (#1352)
This implements an option to emit `Arc<Self>` instead of `&self` in
server traits. This enables implementor to reference `Self` data for
indefinite duration, which may be useful for streaming requests.

Fixes: #1351
2023-04-19 19:36:43 +00:00
Lucio Franco ae75801604 chore: Prepare 0.9.2 release (#1362) 2023-04-17 15:16:32 +00:00
Thomas Orozco 65d909e850 tonic-build: support boxing fields (#1252)
This exposes https://github.com/tokio-rs/prost/pull/802 in Tonic,
though obviously until that's merged and released this diff does
nothing.

Co-authored-by: Lucio Franco <luciofranco14@gmail.com>
2023-04-14 16:56:14 +00:00
Lucio Franco 01cba4992c chore: Prepare 0.9.1 release (#1343)
* Update documentation url in cargo tomls

* Bump versions to 0.9.1

* Update guides

* Add prepare/publish scripts

* Update changelog
2023-04-03 14:31:03 +00:00
Lucio Franco 3a497f2ca2 chore: Prepare v0.9.0 release (#1337) 2023-03-31 18:41:53 +00:00
Lucio Franco ff331199e4 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
2023-03-30 16:59:08 +00:00
Pruthvikar Reddy b3358dc6ac Allow setting skip_protoc_run on the prost Builder (#1318) 2023-03-20 18:40:37 +00:00
林玮 (Jade Lin) 7a6b20d8ef feat: add GrpcMethod extension into request for client (#1275)
* feat: add GrpcMethod extension into request for client

* refactor: change GrpcMethod fields into private and expose methods instead

* refactor: hide GrpcMethod::new in doc

---------

Co-authored-by: Lucio Franco <luciofranco14@gmail.com>
2023-02-23 10:06:45 +00:00
Moncef AOUDIA 9f716d8411 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
2023-02-17 15:58:22 +00:00
Richard ff642f9233 feat(build): Builder: add {enum,message}_attributes (#1234)
Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
2023-01-17 14:25:21 -05:00
Shrutesh Pachineela a562a3ce32 fix(build): Allow Services to be named Result (#1203)
closes #1156
2022-12-21 12:07:07 -05:00
tottoto a8f7e49366 chore(build): Fix clippy lint (#1197) 2022-12-16 12:23:51 -05:00
tottoto bf22a740c3 chore: Update to 2021 edition (#1188) 2022-12-13 15:16:49 -05:00
Jan Teske 25ea473abd tonic-build: use unified syntax to clone Arcs (#1182) 2022-12-13 13:22:54 -05:00
tottoto 2dd09c02bd chore: Fix clippy lint (#1181) 2022-12-13 11:29:29 -05:00
bouzuya 95e8c8bdbb chore: Internal refactor to remove repeitition (#1144) 2022-11-30 14:32:49 -05:00
Lucio Franco d6f0567818 chore: Prepare 0.8.4 (#1170) 2022-11-29 14:22:54 -05:00
Alex Pearson c7476fff42 fix(build): Fix CodeGen8uilder typo (#1165) (#1166) 2022-11-29 14:01:27 -05:00
Lucio Franco dc079c12bf chore: Prepare v0.8.3 release (#1164) 2022-11-28 13:35:48 -05:00
Lucio Franco c4525ba6ad feat(build): Add CodeGenBuilder (#1154)
This commit adds a new `CodeGenBuilder` that replaces the
client/server generate fn with a builder stlye that allows
adding config items in an non-breaking way. This also deprecates
both of the client/server generate fn in favor of the builder ones.
2022-11-28 12:10:44 -05:00
bouzuya e188521149 feat(build): Add disable_comments option (#1127) 2022-11-08 11:08:19 -05:00
LIU JIE c9cadd4b23 chore: remove patch caused cargo error (#1140) 2022-11-08 10:17:54 -05:00
Lucio Franco 1f5bc9b9d5 feat(build): Add build_transport builder option (#1130) 2022-11-04 11:04:23 -04:00
Lucio Franco a7e29c9213 chore: Prepare 0.8.2 release (#1089) 2022-09-28 10:56:22 -04:00
Marek Kuskowski c1b08dffac feat(build): add cleanup-markdown feature flag (#1086) 2022-09-28 10:00:25 -04:00
Lucio Franco ec359ba35f chore: Prepare 0.8 release (#1044) 2022-07-29 16:45:57 -04:00
Oliver Gould feae96c5be feat: Decouple NamedService from the transport feature (#969)
Co-authored-by: Eliza Weisman <eliza@buoyant.io>
2022-06-21 13:48:57 -04:00
Mick van Gelderen 1d2083a1a6 feat(build): Add option to emit rerun-if-changed instructions (#1021) 2022-06-21 10:27:46 -04:00
Lucio Franco 10f6d2f1a9 feat: Add Grpc::with_origin for clients (#1017) 2022-06-20 09:36:51 -04:00
Marcus Griep a585a72293 feat!: remove codegen dependency on compression feature (#1004) 2022-06-13 17:48:27 -04:00
Brandon Williams de2e4ac077 feat(build): Better support for custom codecs (#999)
BREAKING CHANGE: `CODEC_PATH` moved from const to fn
2022-05-05 12:52:03 -04:00
Lucio Franco 1b0b525115 chore: Prepare 0.7.2 release (#998) 2022-05-05 10:19:30 -04:00
Lucio Franco 2112ecc426 chore: Prepare tonic-build 0.7.1 (#988) 2022-04-28 12:56:30 -04:00
Conrad Ludgate 4533a6e20e fix(build): Reduce Default bound requirement (#974)
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2022-04-20 15:38:38 -04:00
Lucio Franco 808c417cbd chore: Prepare 0.10 release (#954) 2022-03-31 17:05:54 -04:00
Tuetuopay d4bd4758dd feat(build): Expose Prost generation plugin (#947) 2022-03-31 14:52:38 -04:00
tottoto 9dab8be5fc chore: Fix clippy lints (#950) 2022-03-31 13:42:00 -04:00
Jesse Szwedko c78274e3fe feat: Update prost to 0.10 (#948) 2022-03-30 10:43:06 -04:00
Sylwester Rąpała c9e78c4d65 chore: Fulfill MIT license requirments (#916) 2022-02-18 13:56:47 -05:00
David Pedersen 6dfc20e1db feat(transport): port router to axum (#830) 2022-02-18 18:19:52 +01:00
Alex Pearson bf44940f9b fix: Handle interceptor errors as responses (#840) (#842) 2022-02-15 15:10:35 -05:00
Matthias Vogelgesang d6c0fc112b feat(build): use prettyplease to format output (#890) (#904) 2022-02-10 13:20:52 -05:00
cssivision a337f132a5 fix(build): clippy warning for must_use (#892) 2022-01-27 11:44:25 -05:00
Joel Höner 7179f7ae6a feat(build): add constructor from_arc for gRPC servers (#875) 2022-01-12 16:36:54 -05:00
tottoto 366d888a4b chore: Fix clippy lints (#881) 2022-01-12 16:32:40 -05:00
David Pedersen e78a2d832f chore: Prepare 0.6.2 (#860)
- Contains the revert to [rust 2018](https://github.com/hyperium/tonic/pull/847).
- Bumps both tonic and tonic-build.
- tonic-build goes from 0.6.0 to 0.6.2 since there was no 0.6.1. I
  believe we want tonic and tonic-build versions to follow each other.
2021-12-08 17:42:16 +01:00
David Pedersen 101f2f76d4 chore: revert to 2018 edition (#847)
Fixes https://github.com/hyperium/tonic/issues/843
2021-12-07 09:49:07 +01:00
Lucio Franco 2fe7131a23 chore: Prepare 0.6.0 release (#811) 2021-10-25 10:25:56 -04:00
Lucio Franco 23c1392fb7 fix(tonic): Remove Sync requirement for streams (#804) 2021-10-24 21:48:05 -04:00
Lucio Franco 1f3df8db9e chore: Upgrade to 2021 edition (#808) 2021-10-24 21:12:20 -04:00