chore: update dependencies

This commit is contained in:
Felipe 2025-02-24 23:33:34 -03:00
parent d368fc932a
commit 1da5f8a73f
Signed by: pitbuster
SSH key fingerprint: SHA256:HDYu2Pm4/TmSX8GBwV49UvFWr1Ljg8XlHxKeCpjJpOk
4 changed files with 601 additions and 331 deletions

895
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,36 +1,36 @@
[package]
name = "huellas"
version = "0.3.0"
edition = "2021"
edition = "2024"
license = "AGPL-3.0"
[dependencies]
anyhow = "1.0.89"
axum = { version = "0.7.7", default-features = false, features = [
anyhow = "1.0.96"
axum = { version = "0.8.1", default-features = false, features = [
"tracing",
"tokio",
"http1",
"http2",
] }
axum-msgpack = "0.4.0"
axum-msgpack = "0.5.0"
dotenvy = "0.15.7"
futures = { version = "0.3.31", default-features = false }
serde = { version = "1.0.210", features = ["derive"] }
sqlx = { version = "0.8.2", default-features = false, features = [
serde = { version = "1.0.218", features = ["derive"] }
sqlx = { version = "0.8.3", default-features = false, features = [
"macros",
"migrate",
"runtime-tokio",
"sqlite",
"tls-rustls",
] }
tokio = { version = "1.40.0", default-features = false, features = [
tokio = { version = "1.43.0", default-features = false, features = [
"macros",
"rt-multi-thread",
"signal",
] }
tower-http = { version = "0.6.1", default-features = false, features = ["fs"] }
tracing = "0.1.40"
tracing-subscriber = { version = "0.3.18", default-features = false, features = [
tower-http = { version = "0.6.2", default-features = false, features = ["fs"] }
tracing = "0.1.41"
tracing-subscriber = { version = "0.3.19", default-features = false, features = [
"env-filter",
"fmt",
"tracing",
@ -38,4 +38,4 @@ tracing-subscriber = { version = "0.3.18", default-features = false, features =
] }
[dev-dependencies]
axum-test = { version = "16.2.0", features = ["msgpack"] }
axum-test = { version = "17.2.0", features = ["msgpack"] }

View file

@ -1,8 +1,10 @@
use anyhow::{Context, Result};
use axum::Router;
use axum::serve::ListenerExt;
use sqlx::sqlite::SqlitePool;
use std::net::SocketAddr;
use tower_http::services::ServeDir;
use tracing::trace;
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
mod place;
@ -37,9 +39,14 @@ async fn main() -> Result<()> {
let port = str::parse(&port).unwrap_or(3000);
let address = SocketAddr::from(([0, 0, 0, 0], port));
tracing::debug!("listening on {}", address);
let listener = tokio::net::TcpListener::bind(address).await?;
let listener = tokio::net::TcpListener::bind(address)
.await?
.tap_io(|tcp_stream| {
if let Err(err) = tcp_stream.set_nodelay(true) {
trace!("failed to set TCP_NODELAY on incoming connection: {err:#}");
}
});
axum::serve(listener, app.into_make_service())
.tcp_nodelay(true)
.with_graceful_shutdown(shutdown_signal())
.await?;

View file

@ -1,7 +1,7 @@
use axum::Router;
use axum::extract::{Path, State};
use axum::http::StatusCode;
use axum::routing::{delete, get};
use axum::Router;
use axum_msgpack::MsgPack;
use futures::TryStreamExt;
use sqlx::sqlite::SqlitePool;
@ -129,8 +129,8 @@ mod tests {
use crate::place::Place;
use anyhow::{Context, Result};
use axum::http::StatusCode;
use axum::Router;
use axum::http::StatusCode;
use axum_test::TestServer;
use sqlx::sqlite::SqlitePool;