From d2c0e0365fefe18d9daec93d1b755eb098fb6bf4 Mon Sep 17 00:00:00 2001 From: mkbeh Date: Sat, 5 Apr 2025 11:15:15 +0300 Subject: [PATCH 1/3] build: bump versions --- Cargo.lock | 88 +++++++++++++++++++++++++++++------------- Cargo.toml | 2 +- rust-toolchain.toml | 2 +- src/bin/chat/main.rs | 3 +- src/bin/worker/main.rs | 3 +- 5 files changed, 66 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d963311..10e804b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -284,9 +284,9 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "caslex" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da5d7afb968f5c8cef024fa01de4bf09305343d8320e129753c74c170910558" +checksum = "e35dee289ebcbcf2404a20afd70f3ba76d1f279797ac75c5bbf5f18d072d463a" dependencies = [ "anyhow", "async-trait", @@ -339,9 +339,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.17" +version = "1.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fcb57c740ae1daf453ae85f16e37396f672b039e00d9d866e07ddb24e328e3a" +checksum = "525046617d8376e3db1deffb079e91cef90a89fc3ca5c185bbf8c9ecdd15cd5c" dependencies = [ "shlex", ] @@ -369,9 +369,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.34" +version = "4.5.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e958897981290da2a852763fe9cdb89cd36977a5d729023127095fa94d95e2ff" +checksum = "d8aa86934b44c19c50f87cc2790e19f54f7a67aedb64101c2e1a2e5ecfb73944" dependencies = [ "clap_builder", "clap_derive", @@ -379,9 +379,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.34" +version = "4.5.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b0f35019843db2160b5bb19ae09b4e6411ac33fc6a712003c33e03090e2489" +checksum = "2414dbb2dd0695280da6ea9261e327479e9d37b0630f6b53ba2a11c60c679fd9" dependencies = [ "anstream", "anstyle", @@ -573,9 +573,9 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "flate2" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11faaf5a5236997af9848be0bef4db95824b1d534ebc64d0f0c6cf3e67bd38dc" +checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece" dependencies = [ "crc32fast", "miniz_oxide", @@ -867,9 +867,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" +checksum = "497bbc33a26fdd4af9ed9c70d63f61cf56a938375fbb32df34db9b1cd6d643f2" dependencies = [ "bytes", "futures-channel", @@ -877,6 +877,7 @@ dependencies = [ "http", "http-body", "hyper", + "libc", "pin-project-lite", "socket2", "tokio", @@ -886,9 +887,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.62" +version = "0.1.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2fd658b06e56721792c5df4475705b6cda790e9298d19d2f8af083457bcd127" +checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1055,9 +1056,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" +checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" dependencies = [ "equivalent", "hashbrown", @@ -1189,9 +1190,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "miniz_oxide" -version = "0.8.5" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" +checksum = "ff70ce3e48ae43fa075863cef62e8b43b71a4f2382229920e0df362592919430" dependencies = [ "adler2", ] @@ -1304,9 +1305,9 @@ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "opentelemetry" -version = "0.29.0" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "768ee97dc5cd695a4dd4a69a0678fb42789666b5a89e8c0af48bb06c6e427120" +checksum = "9e87237e2775f74896f9ad219d26a2081751187eb7c9f5c58dde20a23b95d16c" dependencies = [ "futures-core", "futures-sink", @@ -1966,9 +1967,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.14.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" +checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" [[package]] name = "socket2" @@ -2715,11 +2716,37 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.52.0" +version = "0.61.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980" dependencies = [ - "windows-targets 0.52.6", + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings 0.4.0", +] + +[[package]] +name = "windows-implement" +version = "0.60.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-interface" +version = "0.59.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +dependencies = [ + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -2735,7 +2762,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" dependencies = [ "windows-result", - "windows-strings", + "windows-strings 0.3.1", "windows-targets 0.53.0", ] @@ -2757,6 +2784,15 @@ dependencies = [ "windows-link", ] +[[package]] +name = "windows-strings" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97" +dependencies = [ + "windows-link", +] + [[package]] name = "windows-sys" version = "0.52.0" diff --git a/Cargo.toml b/Cargo.toml index 119c007..fd3a4ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ serde_json = "1.0.140" anyhow = { version = "1.0.97", default-features = false } async-trait = { version = "0.1.88" } axum = { version = "0.8.3", features = ["http1", "http2", "json", "macros"] } -caslex = { version = "0.2.1", features = ["auth"] } +caslex = { version = "0.2.2", features = ["auth"] } caslex-extra = { version = "0.2.3", features = ["observability", "postgres", "jwt"] } chrono = { version = "0.4.40", features = ["serde"] } deadpool-postgres = { version = "0.14.1" } diff --git a/rust-toolchain.toml b/rust-toolchain.toml index ce80282..b5a74a6 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.85.1" +channel = "1.86" components = ["rustfmt", "clippy", "rust-analyzer"] profile = "minimal" \ No newline at end of file diff --git a/src/bin/chat/main.rs b/src/bin/chat/main.rs index 7f87ed5..3189aa5 100644 --- a/src/bin/chat/main.rs +++ b/src/bin/chat/main.rs @@ -4,8 +4,7 @@ mod entrypoint; #[tokio::main] async fn main() { - static SERVICE_NAME: &str = env!("CARGO_PKG_NAME"); - caslex_extra::setup_application(SERVICE_NAME); + caslex_extra::setup_application(env!("CARGO_PKG_NAME")); let mut entry = entrypoint::Entrypoint::new(); let entry_result = entry.bootstrap_server().await; diff --git a/src/bin/worker/main.rs b/src/bin/worker/main.rs index 7f87ed5..3189aa5 100644 --- a/src/bin/worker/main.rs +++ b/src/bin/worker/main.rs @@ -4,8 +4,7 @@ mod entrypoint; #[tokio::main] async fn main() { - static SERVICE_NAME: &str = env!("CARGO_PKG_NAME"); - caslex_extra::setup_application(SERVICE_NAME); + caslex_extra::setup_application(env!("CARGO_PKG_NAME")); let mut entry = entrypoint::Entrypoint::new(); let entry_result = entry.bootstrap_server().await; From 4c96190fcc5ff63c595169205ba109a88022f332 Mon Sep 17 00:00:00 2001 From: mkbeh Date: Sat, 5 Apr 2025 11:33:55 +0300 Subject: [PATCH 2/3] build: minor fixes --- .env.template | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.template b/.env.template index 9c211c5..86dda4c 100644 --- a/.env.template +++ b/.env.template @@ -9,7 +9,7 @@ SERVER_HOST=0.0.0.0 # Log/Trace settings LOG_LEVEL=trace -TRACE_LOG_LEVEL=trace +OTEL_LOG_LEVEL=trace # Auth settings JWT_SECRET=bc3ef5f9b140bfdeb31e7fd183841e06255f6a9e41e422cf267a22f5468d7223 diff --git a/Cargo.toml b/Cargo.toml index fd3a4ed..7689648 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "rust-simple-chat" version = "0.1.0" edition = "2024" -[profile.production] +[profile.release-lto] inherits = "release" lto = true From e7bc9542e6fd13ce39855c1a869d0adb9a9e1643 Mon Sep 17 00:00:00 2001 From: mkbeh Date: Sat, 5 Apr 2025 11:41:58 +0300 Subject: [PATCH 3/3] build: bump deps --- Cargo.lock | 8 ++++---- Cargo.toml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 10e804b..289fa4d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -284,9 +284,9 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "caslex" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e35dee289ebcbcf2404a20afd70f3ba76d1f279797ac75c5bbf5f18d072d463a" +checksum = "33efd1ee4c94709e14deb6b9c355f929c20c965b09e49b4abfad1dcdaace9d50" dependencies = [ "anyhow", "async-trait", @@ -318,9 +318,9 @@ dependencies = [ [[package]] name = "caslex-extra" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee5951ec4b9649cfd597af08bb014c65c9bdfaf6b9dd0c5805adc0ed05d43c30" +checksum = "01cca2e4de2737a9fd1416b9ef98e1d18669ebef58d467b8a5898439c01d5638" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index 7689648..c742fb5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,8 +32,8 @@ serde_json = "1.0.140" anyhow = { version = "1.0.97", default-features = false } async-trait = { version = "0.1.88" } axum = { version = "0.8.3", features = ["http1", "http2", "json", "macros"] } -caslex = { version = "0.2.2", features = ["auth"] } -caslex-extra = { version = "0.2.3", features = ["observability", "postgres", "jwt"] } +caslex = { version = "0.2.3", features = ["auth"] } +caslex-extra = { version = "0.2.4", features = ["observability", "postgres", "jwt"] } chrono = { version = "0.4.40", features = ["serde"] } deadpool-postgres = { version = "0.14.1" } mockall = { version = "0.13.1" }