Skip to content

Commit 9cc6569

Browse files
committed
[rust]: update deps and upgrade to rust 1.89
1 parent 30c56fb commit 9cc6569

File tree

6 files changed

+16
-17
lines changed

6 files changed

+16
-17
lines changed

frameworks/Rust/viz/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ mime = "0.3"
3535
rand = { version = "0.9", features = ["small_rng"] }
3636
thiserror = "2.0"
3737
futures-util = "0.3"
38-
socket2 = "0.5.8"
38+
socket2 = { version = "0.6.0", features = ["all"] }
3939
num_cpus = "1.16.0"
4040

4141
[target.'cfg(not(unix))'.dependencies]
42-
nanorand = { version = "0.7" }
42+
nanorand = { version = "0.8" }
4343

4444
[target.'cfg(unix)'.dependencies]
45-
nanorand = { version = "0.7", features = ["getrandom"] }
45+
nanorand = { version = "0.8", features = ["getrandom"] }
4646

4747
tokio = { version = "1", features = ["full"] }
4848
tokio-postgres = { version = "0.7", optional = true }
@@ -55,15 +55,15 @@ sqlx = { version = "0.8", features = [
5555
diesel = { version = "2.2", default-features = false, features = [
5656
"i-implement-a-third-party-backend-and-opt-into-breaking-changes",
5757
], optional = true }
58-
diesel-async = { version = "0.5", default-features = false, features = [
58+
diesel-async = { version = "0.6", default-features = false, features = [
5959
"postgres",
6060
"bb8",
6161
], optional = true }
6262

6363
yarte = { version = "0.15", features = ["bytes-buf", "json"], optional = true }
6464
markup = { version = "0.15", optional = true }
6565
v_htmlescape = { version = "0.15", optional = true }
66-
sailfish = { version = "0.9", optional = true }
66+
sailfish = { version = "0.10", optional = true }
6767

6868
[profile.release]
6969
lto = true

frameworks/Rust/viz/src/server.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ use std::net::{Ipv4Addr, SocketAddr};
55
use std::sync::Arc;
66
use std::thread;
77

8-
use socket2::{Domain, SockAddr, Socket};
98
use hyper::server::conn::http1::Builder;
109
use hyper_util::rt::TokioIo;
10+
use socket2::{Domain, SockAddr, Socket};
1111
use tokio::{net::TcpListener, runtime};
1212
use viz::{Responder, Router, Tree};
1313

@@ -31,12 +31,11 @@ pub async fn serve(router: Router) -> Result<(), Box<dyn Error + Send + Sync>> {
3131
let tree = tree.clone();
3232

3333
tokio::spawn(async move {
34-
http
35-
.serve_connection(
36-
TokioIo::new(tcp),
37-
Responder::<Arc<SocketAddr>>::new(tree, None),
38-
)
39-
.await
34+
http.serve_connection(
35+
TokioIo::new(tcp),
36+
Responder::<Arc<SocketAddr>>::new(tree, None),
37+
)
38+
.await
4039
});
4140
}
4241
}
@@ -52,7 +51,7 @@ fn create_socket(addr: SocketAddr) -> Result<Socket, io::Error> {
5251
#[cfg(unix)]
5352
socket.set_reuse_port(true)?;
5453
socket.set_reuse_address(true)?;
55-
socket.set_nodelay(true)?;
54+
socket.set_tcp_nodelay(true)?;
5655
socket.set_nonblocking(true)?;
5756
socket.bind(&addr)?;
5857
socket.listen(backlog)?;

frameworks/Rust/viz/viz-diesel.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rust:1.85
1+
FROM rust:1.89
22

33
ADD ./ /viz
44
WORKDIR /viz

frameworks/Rust/viz/viz-pg.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rust:1.85
1+
FROM rust:1.89
22

33
ADD ./ /viz
44
WORKDIR /viz

frameworks/Rust/viz/viz-sqlx.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rust:1.85
1+
FROM rust:1.89
22

33
ADD ./ /viz
44
WORKDIR /viz

frameworks/Rust/viz/viz.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rust:1.85
1+
FROM rust:1.89
22

33
ADD ./ /viz
44
WORKDIR /viz

0 commit comments

Comments
 (0)