Browse Source

Update rust version (#7439)

Nikolay Kim 3 years ago
parent
commit
29a9662cbd

+ 1 - 1
frameworks/Rust/ntex/ntex-astd.dockerfile

@@ -1,4 +1,4 @@
-FROM rust:1.60.0
+FROM rust:1.61.0
 
 
 # Disable simd at jsonescape
 # Disable simd at jsonescape
 # ENV CARGO_CFG_JSONESCAPE_DISABLE_AUTO_SIMD=
 # ENV CARGO_CFG_JSONESCAPE_DISABLE_AUTO_SIMD=

+ 1 - 1
frameworks/Rust/ntex/ntex-db-astd.dockerfile

@@ -1,4 +1,4 @@
-FROM rust:1.60.0
+FROM rust:1.61.0
 
 
 # Disable simd at jsonescape
 # Disable simd at jsonescape
 # ENV CARGO_CFG_JSONESCAPE_DISABLE_AUTO_SIMD=
 # ENV CARGO_CFG_JSONESCAPE_DISABLE_AUTO_SIMD=

+ 1 - 1
frameworks/Rust/ntex/ntex-db.dockerfile

@@ -1,4 +1,4 @@
-FROM rust:1.60.0
+FROM rust:1.61.0
 
 
 # Disable simd at jsonescape
 # Disable simd at jsonescape
 # ENV CARGO_CFG_JSONESCAPE_DISABLE_AUTO_SIMD=
 # ENV CARGO_CFG_JSONESCAPE_DISABLE_AUTO_SIMD=

+ 1 - 1
frameworks/Rust/ntex/ntex-plt-astd.dockerfile

@@ -1,4 +1,4 @@
-FROM rust:1.60.0
+FROM rust:1.61.0
 
 
 # Disable simd at jsonescape
 # Disable simd at jsonescape
 # ENV CARGO_CFG_JSONESCAPE_DISABLE_AUTO_SIMD=
 # ENV CARGO_CFG_JSONESCAPE_DISABLE_AUTO_SIMD=

+ 1 - 1
frameworks/Rust/ntex/ntex-plt.dockerfile

@@ -1,4 +1,4 @@
-FROM rust:1.60.0
+FROM rust:1.61.0
 
 
 # Disable simd at jsonescape
 # Disable simd at jsonescape
 # ENV CARGO_CFG_JSONESCAPE_DISABLE_AUTO_SIMD=
 # ENV CARGO_CFG_JSONESCAPE_DISABLE_AUTO_SIMD=

+ 1 - 1
frameworks/Rust/ntex/ntex.dockerfile

@@ -1,4 +1,4 @@
-FROM rust:1.60.0
+FROM rust:1.61.0
 
 
 # Disable simd at jsonescape
 # Disable simd at jsonescape
 # ENV CARGO_CFG_JSONESCAPE_DISABLE_AUTO_SIMD=
 # ENV CARGO_CFG_JSONESCAPE_DISABLE_AUTO_SIMD=

+ 1 - 1
frameworks/Rust/ntex/src/db.rs

@@ -1,7 +1,7 @@
 use std::{borrow::Cow, fmt::Write as FmtWrite};
 use std::{borrow::Cow, fmt::Write as FmtWrite};
 
 
 use futures::{Future, FutureExt};
 use futures::{Future, FutureExt};
-use nanorand::{WyRand, Rng};
+use nanorand::{Rng, WyRand};
 use ntex::util::{join_all, Bytes, BytesMut};
 use ntex::util::{join_all, Bytes, BytesMut};
 use smallvec::SmallVec;
 use smallvec::SmallVec;
 use tokio_postgres::types::ToSql;
 use tokio_postgres::types::ToSql;

+ 2 - 2
frameworks/Rust/ntex/src/main.rs

@@ -50,8 +50,8 @@ async fn main() -> std::io::Result<()> {
         .backlog(1024)
         .backlog(1024)
         .bind("techempower", "0.0.0.0:8080", |cfg| {
         .bind("techempower", "0.0.0.0:8080", |cfg| {
             cfg.memory_pool(PoolId::P1);
             cfg.memory_pool(PoolId::P1);
-            PoolId::P1.set_read_params(65535, 1024);
-            PoolId::P1.set_write_params(65535, 1024);
+            PoolId::P1.set_read_params(65535, 8192);
+            PoolId::P1.set_write_params(65535, 8192);
 
 
             http::HttpService::build()
             http::HttpService::build()
                 .keep_alive(http::KeepAlive::Os)
                 .keep_alive(http::KeepAlive::Os)

+ 3 - 2
frameworks/Rust/ntex/src/main_db.rs

@@ -1,3 +1,4 @@
+#[cfg(not(target_os = "macos"))]
 #[global_allocator]
 #[global_allocator]
 static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
 static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
 
 
@@ -100,8 +101,8 @@ async fn main() -> std::io::Result<()> {
         .backlog(1024)
         .backlog(1024)
         .bind("techempower", "0.0.0.0:8080", |cfg| {
         .bind("techempower", "0.0.0.0:8080", |cfg| {
             cfg.memory_pool(PoolId::P1);
             cfg.memory_pool(PoolId::P1);
-            PoolId::P1.set_read_params(65535, 1024);
-            PoolId::P1.set_write_params(65535, 1024);
+            PoolId::P1.set_read_params(65535, 8192);
+            PoolId::P1.set_write_params(65535, 8192);
 
 
             HttpService::build()
             HttpService::build()
                 .keep_alive(KeepAlive::Os)
                 .keep_alive(KeepAlive::Os)

+ 2 - 2
frameworks/Rust/ntex/src/main_plt.rs

@@ -88,8 +88,8 @@ async fn main() -> io::Result<()> {
         .backlog(1024)
         .backlog(1024)
         .bind("techempower", "0.0.0.0:8080", |cfg| {
         .bind("techempower", "0.0.0.0:8080", |cfg| {
             cfg.memory_pool(PoolId::P1);
             cfg.memory_pool(PoolId::P1);
-            PoolId::P1.set_read_params(65535, 1024);
-            PoolId::P1.set_write_params(65535, 1024);
+            PoolId::P1.set_read_params(65535, 8192);
+            PoolId::P1.set_write_params(65535, 8192);
 
 
             fn_service(|io| App {
             fn_service(|io| App {
                 io,
                 io,