From 2907e7c002fd3fadafd5e129f5c74b10c5fe7f88 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Mar 2025 16:49:50 +0000 Subject: [PATCH 1/2] Bump ring in /packages/backend in the cargo group across 1 directory Bumps the cargo group with 1 update in the /packages/backend directory: [ring](https://github.com/briansmith/ring). Updates `ring` from 0.16.20 to 0.17.12 - [Changelog](https://github.com/briansmith/ring/blob/main/RELEASES.md) - [Commits](https://github.com/briansmith/ring/commits) --- updated-dependencies: - dependency-name: ring dependency-type: direct:production dependency-group: cargo ... Signed-off-by: dependabot[bot] --- packages/backend/Cargo.lock | 143 ++++++------------------------------ packages/backend/Cargo.toml | 2 +- 2 files changed, 22 insertions(+), 123 deletions(-) diff --git a/packages/backend/Cargo.lock b/packages/backend/Cargo.lock index a0b5065..01a3c1f 100644 --- a/packages/backend/Cargo.lock +++ b/packages/backend/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" @@ -179,12 +179,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "bumpalo" -version = "3.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" - [[package]] name = "byte-unit" version = "4.0.19" @@ -384,6 +378,17 @@ dependencies = [ "slab", ] +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", +] + [[package]] name = "getrandom" version = "0.3.1" @@ -653,16 +658,6 @@ dependencies = [ "libc", ] -[[package]] -name = "js-sys" -version = "0.3.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" -dependencies = [ - "once_cell", - "wasm-bindgen", -] - [[package]] name = "lazy_static" version = "1.5.0" @@ -967,17 +962,16 @@ dependencies = [ [[package]] name = "ring" -version = "0.16.20" +version = "0.17.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +checksum = "ed9b823fa29b721a59671b41d6b06e66b29e0628e207e8b1c3ceeda701ec928d" dependencies = [ "cc", + "cfg-if", + "getrandom 0.2.15", "libc", - "once_cell", - "spin", "untrusted", - "web-sys", - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -1149,12 +1143,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -1197,7 +1185,7 @@ checksum = "22e5a0acb1f3f55f65cc4a866c361b2fb2a0ff6366785ae6fbb5f85df07ba230" dependencies = [ "cfg-if", "fastrand", - "getrandom", + "getrandom 0.3.1", "once_cell", "rustix", "windows-sys 0.59.0", @@ -1363,9 +1351,9 @@ checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe" [[package]] name = "untrusted" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" @@ -1402,7 +1390,7 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0f540e3240398cce6128b64ba83fdbdd86129c16a3aa1a3a252efd66eb3d587" dependencies = [ - "getrandom", + "getrandom 0.3.1", ] [[package]] @@ -1426,95 +1414,6 @@ dependencies = [ "wit-bindgen-rt", ] -[[package]] -name = "wasm-bindgen" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" -dependencies = [ - "cfg-if", - "once_cell", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "web-sys" -version = "0.3.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - [[package]] name = "windows-sys" version = "0.52.0" diff --git a/packages/backend/Cargo.toml b/packages/backend/Cargo.toml index 307cc6d..bef60e3 100644 --- a/packages/backend/Cargo.toml +++ b/packages/backend/Cargo.toml @@ -21,7 +21,7 @@ redis = { version = "0.25.2", features = ["tls-native-tls"] } # Utility serde_json = "1" lazy_static = "1" -ring = "0.16" +ring = "0.17" bs62 = "0.1" byte-unit = "4" dotenv = "0.15" From 1a243cc96a7cfb314adf12a2e7408e10e4e8e562 Mon Sep 17 00:00:00 2001 From: Stefan Meinecke Date: Tue, 12 May 2026 18:39:03 +0200 Subject: [PATCH 2/2] Replace Redis with Valkey in docker-compose files and fix Rust 2024 compat Swap redis:7-alpine images to valkey/valkey:7-alpine across all docker-compose files and example READMEs. Keep service name as "redis" so that the default REDIS=redis://redis/ connection string still resolves correctly in Docker networking. Also add turbofish type annotations to redis crate calls in store.rs for Rust 2024 never-type-fallback compatibility, and fix a typo ("notion" -> "note") in an error message. --- docker-compose.dev.yaml | 6 +++--- docker-compose.yaml | 6 +++--- examples/nginx/docker-compose.yaml | 6 +++--- examples/scratch/README.md | 6 +++--- examples/traefik/README.md | 12 ++++++------ packages/backend/src/store.rs | 8 ++++---- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/docker-compose.dev.yaml b/docker-compose.dev.yaml index fd4d10b..c651a8e 100644 --- a/docker-compose.dev.yaml +++ b/docker-compose.dev.yaml @@ -3,11 +3,11 @@ services: redis: - image: redis:7-alpine + image: valkey/valkey:7-alpine # This is required to stay in RAM only. - command: redis-server --save "" --appendonly no + command: valkey-server --save "" --appendonly no # Set a size limit. See link below on how to customise. - # https://redis.io/docs/latest/operate/rs/databases/memory-performance/eviction-policy/ + # https://valkey.io/docs/latest/operate/rs/databases/memory-performance/eviction-policy/ # --maxmemory 1gb --maxmemory-policy allkeys-lrulpine # This prevents the creation of an anonymous volume. tmpfs: diff --git a/docker-compose.yaml b/docker-compose.yaml index 0a9d1b6..3a0b25f 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,10 +1,10 @@ services: redis: - image: redis:7-alpine + image: valkey/valkey:7-alpine # This is required to stay in RAM only. - command: redis-server --save "" --appendonly no + command: valkey-server --save "" --appendonly no # Set a size limit. See link below on how to customise. - # https://redis.io/docs/latest/operate/rs/databases/memory-performance/eviction-policy/ + # https://valkey.io/docs/latest/operate/rs/databases/memory-performance/eviction-policy/ # --maxmemory 1gb --maxmemory-policy allkeys-lrulpine # This prevents the creation of an anonymous volume. tmpfs: diff --git a/examples/nginx/docker-compose.yaml b/examples/nginx/docker-compose.yaml index ddd1b0b..16cd0b0 100644 --- a/examples/nginx/docker-compose.yaml +++ b/examples/nginx/docker-compose.yaml @@ -2,11 +2,11 @@ version: '3.8' services: redis: - image: redis:7-alpine + image: valkey/valkey:7-alpine # This is required to stay in RAM only. - command: redis-server --save "" --appendonly no + command: valkey-server --save "" --appendonly no # Set a size limit. See link below on how to customise. - # https://redis.io/docs/latest/operate/rs/databases/memory-performance/eviction-policy/ + # https://valkey.io/docs/latest/operate/rs/databases/memory-performance/eviction-policy/ # --maxmemory 1gb --maxmemory-policy allkeys-lrulpine # This prevents the creation of an anonymous volume. tmpfs: diff --git a/examples/scratch/README.md b/examples/scratch/README.md index db9d167..f403ef9 100644 --- a/examples/scratch/README.md +++ b/examples/scratch/README.md @@ -108,11 +108,11 @@ networks: services: redis: - image: redis:7-alpine + image: valkey/valkey:7-alpine # This is required to stay in RAM only. - command: redis-server --save "" --appendonly no + command: valkey-server --save "" --appendonly no # Set a size limit. See link below on how to customise. - # https://redis.io/docs/latest/operate/rs/databases/memory-performance/eviction-policy/ + # https://valkey.io/docs/latest/operate/rs/databases/memory-performance/eviction-policy/ # --maxmemory 1gb --maxmemory-policy allkeys-lrulpine # This prevents the creation of an anonymous volume. tmpfs: diff --git a/examples/traefik/README.md b/examples/traefik/README.md index 7287af0..c087dde 100644 --- a/examples/traefik/README.md +++ b/examples/traefik/README.md @@ -17,11 +17,11 @@ networks: services: redis: - image: redis:7-alpine + image: valkey/valkey:7-alpine # This is required to stay in RAM only. - command: redis-server --save "" --appendonly no + command: valkey-server --save "" --appendonly no # Set a size limit. See link below on how to customise. - # https://redis.io/docs/latest/operate/rs/databases/memory-performance/eviction-policy/ + # https://valkey.io/docs/latest/operate/rs/databases/memory-performance/eviction-policy/ # --maxmemory 1gb --maxmemory-policy allkeys-lrulpine # This prevents the creation of an anonymous volume. tmpfs: @@ -61,11 +61,11 @@ services: - "/var/run/docker.sock:/var/run/docker.sock:ro" redis: - image: redis:7-alpine + image: valkey/valkey:7-alpine # This is required to stay in RAM only. - command: redis-server --save "" --appendonly no + command: valkey-server --save "" --appendonly no # Set a size limit. See link below on how to customise. - # https://redis.io/docs/latest/operate/rs/databases/memory-performance/eviction-policy/ + # https://valkey.io/docs/latest/operate/rs/databases/memory-performance/eviction-policy/ # --maxmemory 1gb --maxmemory-policy allkeys-lrulpine # This prevents the creation of an anonymous volume. tmpfs: diff --git a/packages/backend/src/store.rs b/packages/backend/src/store.rs index bebf2d2..53fe82b 100644 --- a/packages/backend/src/store.rs +++ b/packages/backend/src/store.rs @@ -31,13 +31,13 @@ pub fn set(id: &String, note: &Note) -> Result<(), &'static str> { let serialized = serde_json::to_string(¬e.clone()).unwrap(); let mut conn = get_connection()?; - conn.set(id, serialized) + conn.set::<_, _, ()>(id, serialized) .map_err(|_| "Unable to set note in redis")?; match note.expiration { Some(e) => { let seconds = e - now(); - conn.expire(id, seconds as i64) - .map_err(|_| "Unable to set expiration on notion")? + conn.expire::<_, ()>(id, seconds as i64) + .map_err(|_| "Unable to set expiration on note")? } None => {} }; @@ -58,6 +58,6 @@ pub fn get(id: &String) -> Result, &'static str> { pub fn del(id: &String) -> Result<(), &'static str> { let mut conn = get_connection()?; - conn.del(id).map_err(|_| "Unable to delete note in redis")?; + conn.del::<_, ()>(id).map_err(|_| "Unable to delete note in redis")?; Ok(()) }