File tree Expand file tree Collapse file tree 10 files changed +30
-20
lines changed
Expand file tree Collapse file tree 10 files changed +30
-20
lines changed Original file line number Diff line number Diff line change 22name = " custom"
33version = " 1.0.0"
44edition = " 2024"
5- rust-version = " 1.85 "
5+ rust-version = " 1.88 "
66
77[[bin ]]
88name = " client"
99path = " src/client.rs"
1010
1111[dependencies ]
12- ntex = " 3.0.0-pre.2 "
13- ntex-h2 = " 3.0.0 "
14- ntex-grpc = " 1.0.0 "
12+ ntex = " 3.0"
13+ ntex-h2 = " 3.6 "
14+ ntex-grpc = " 1.0"
1515
1616env_logger = " 0.11"
1717uuid = { version = " 1" , features = [" v4" ] }
1818
1919[dev-dependencies ]
20- ntex = { version = " 3.0.0-pre.2 " , features = [" openssl" , " tokio" ] }
20+ ntex = { version = " 3.0" , features = [" openssl" , " tokio" ] }
Original file line number Diff line number Diff line change 22name = " helloworld"
33version = " 1.0.0"
44edition = " 2024"
5- rust-version = " 1.85 "
5+ rust-version = " 1.88 "
66
77[[bin ]]
88name = " client"
@@ -13,7 +13,7 @@ name = "server"
1313path = " src/server.rs"
1414
1515[dependencies ]
16- ntex = { version = " 3.0.0-pre.9 " , features = [" tokio" ] }
16+ ntex = { version = " 3.0" , features = [" tokio" ] }
1717ntex-grpc = " 1"
1818ntex-h2 = " 3"
1919
@@ -23,4 +23,4 @@ env_logger = "0.11"
2323num_cpus = " 1"
2424
2525[dev-dependencies ]
26- ntex = { version = " 3.0.0-pre.9 " , features = [" openssl" , " tokio" ] }
26+ ntex = { version = " 3.0" , features = [" openssl" , " tokio" ] }
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ fn main() {
4141
4242 thread:: spawn ( move || {
4343 println ! ( "Starting thread: {t}" ) ;
44- let sys = System :: new ( "client" ) ;
44+ let sys = System :: new ( "client" , ntex :: rt :: DefaultRuntime ) ;
4545
4646 sys. block_on ( async move {
4747 let h2client = h2:: ClientBuilder :: with_default ( addr)
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ async fn main() -> std::io::Result<()> {
6666 let threads = parse_usize_default ( matches. value_of ( "threads" ) , num_cpus:: get ( ) ) ;
6767
6868 // bind to socket
69- Server :: build ( )
69+ Server :: builder ( )
7070 . bind ( "helloworld" , format ! ( "0.0.0.0:{port}" ) , async move |_| {
7171 // create service
7272 server:: GrpcServer :: new ( GreeterServer )
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ readme = "README.md"
1010keywords = [" grpc" ]
1111categories = [" asynchronous" , " network-programming" ]
1212edition = " 2024"
13- rust-version = " 1.85 "
13+ rust-version = " 1.88 "
1414
1515[[bin ]]
1616name = " ntex-grpc"
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ repository = "https://github.com/ntex-rs/ntex-grpc"
77readme = " README.md"
88description = " A Protocol Buffers implementation for the Rust Language."
99edition = " 2024"
10- rust-version = " 1.85 "
10+ rust-version = " 1.88 "
1111
1212[lib ]
1313proc-macro = true
Original file line number Diff line number Diff line change 11# Changes
22
3+ ## [ 1.3.0] - 2026-02-02
4+
5+ * Upgrade to ntex v3.0
6+
37## [ 1.2.0] - 2025-12-22
48
59* Add "CONTENT-TYPE" header to server response
Original file line number Diff line number Diff line change 11[package ]
22name = " ntex-grpc"
3- version = " 1.2 .0"
3+ version = " 1.3 .0"
44license = " MIT OR Apache-2.0"
55authors = [" Nikolay Kim <fafhrd91@gmail.com>" ]
66description = " GRPC Client/Server framework"
@@ -10,14 +10,14 @@ readme = "README.md"
1010keywords = [" grpc" ]
1111categories = [" asynchronous" , " network-programming" ]
1212edition = " 2024"
13- rust-version = " 1.85 "
13+ rust-version = " 1.88 "
1414
1515[lib ]
1616name = " ntex_grpc"
1717path = " src/lib.rs"
1818
1919[dependencies ]
20- ntex-h2 = " 3.2 "
20+ ntex-h2 = " 3.6 "
2121ntex-http = " 1"
2222ntex-io = " 3"
2323ntex-util = " 3"
@@ -33,4 +33,4 @@ pin-project-lite = "0.2"
3333[dev-dependencies ]
3434openssl = " 0.10"
3535env_logger = " 0.11"
36- ntex = { version = " 3.0.0-pre.9 " , features = [" openssl" , " neon" ] }
36+ ntex = { version = " 3.0" , features = [" openssl" , " neon" ] }
Original file line number Diff line number Diff line change @@ -120,13 +120,13 @@ where
120120
121121struct ControlService ;
122122
123- impl Service < h2:: ControlMessage < h2:: StreamError > > for ControlService {
124- type Response = h2:: ControlResult ;
123+ impl Service < h2:: Control < h2:: StreamError > > for ControlService {
124+ type Response = h2:: ControlAck ;
125125 type Error = ( ) ;
126126
127127 async fn call (
128128 & self ,
129- msg : h2:: ControlMessage < h2:: StreamError > ,
129+ msg : h2:: Control < h2:: StreamError > ,
130130 _: ServiceCtx < ' _ , Self > ,
131131 ) -> Result < Self :: Response , Self :: Error > {
132132 log:: trace!( "Control message: {msg:?}" ) ;
Original file line number Diff line number Diff line change @@ -85,7 +85,11 @@ pub trait NativeType: PartialEq + Default + Sized + fmt::Debug {
8585 DefaultValue :: Value ( d) => self == d,
8686 } ;
8787
88- if default { 0 } else { self . encoded_len ( tag) }
88+ if default {
89+ 0
90+ } else {
91+ self . encoded_len ( tag)
92+ }
8993 }
9094
9195 #[ inline]
@@ -652,6 +656,7 @@ mod tests {
652656 Ok ( msg)
653657 }
654658
659+ #[ allow( clippy:: identity_op) ]
655660 #[ inline]
656661 fn encoded_len ( & self ) -> usize {
657662 0 + NativeType :: serialized_len ( & self . f , 1 , DefaultValue :: Default )
@@ -661,6 +666,7 @@ mod tests {
661666 }
662667 }
663668
669+ #[ allow( clippy:: field_reassign_with_default) ]
664670 #[ test]
665671 fn test_hashmap_default_values ( ) {
666672 let mut msg = TestMessage :: default ( ) ;
You can’t perform that action at this time.
0 commit comments