From 9a088ab90913a2b720ac696fb25f528a6d32a62c Mon Sep 17 00:00:00 2001 From: Lilith Silver <84940819+LilithSilver@users.noreply.github.com> Date: Wed, 7 Jan 2026 12:20:48 -0800 Subject: [PATCH 1/4] Update dependencies and replace bs58 with b58 --- Cargo.lock | 70 +++++++---------------------------- samod-core/Cargo.toml | 6 +-- samod-core/src/document_id.rs | 6 +-- samod/Cargo.toml | 6 +-- 4 files changed, 22 insertions(+), 66 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e0352fc..76375f7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -88,7 +88,7 @@ dependencies = [ "rand", "rustc-hash", "serde", - "sha2 0.11.0-rc.3", + "sha2", "smol_str", "thiserror", "tinyvec", @@ -125,7 +125,7 @@ dependencies = [ "sha1", "sync_wrapper", "tokio", - "tokio-tungstenite 0.28.0", + "tokio-tungstenite", "tower", "tower-layer", "tower-service", @@ -151,6 +151,12 @@ dependencies = [ "tracing", ] +[[package]] +name = "b58" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a208ac9ab2099506287a2c1d8ca1d822724c9e36346a9cc089b58463e20df42b" + [[package]] name = "base64" version = "0.21.7" @@ -196,16 +202,6 @@ dependencies = [ "cfg_aliases", ] -[[package]] -name = "bs58" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" -dependencies = [ - "sha2 0.10.9", - "tinyvec", -] - [[package]] name = "bumpalo" version = "3.19.0" @@ -1336,11 +1332,11 @@ dependencies = [ "tokio", "tokio-stream", "tokio-test", - "tokio-tungstenite 0.27.0", + "tokio-tungstenite", "tokio-util", "tracing", "tracing-subscriber", - "tungstenite 0.27.0", + "tungstenite", ] [[package]] @@ -1348,14 +1344,14 @@ name = "samod-core" version = "0.6.1" dependencies = [ "automerge", + "b58", "base64 0.21.7", - "bs58", "hex", "minicbor", "rand", "samod-test-harness", "serde", - "sha2 0.10.9", + "sha2", "thiserror", "tokio", "tracing", @@ -1459,17 +1455,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "sha2" -version = "0.10.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - [[package]] name = "sha2" version = "0.11.0-rc.3" @@ -1717,18 +1702,6 @@ dependencies = [ "tokio-stream", ] -[[package]] -name = "tokio-tungstenite" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "489a59b6730eda1b0171fcfda8b121f4bee2b35cba8645ca35c5f7ba3eb736c1" -dependencies = [ - "futures-util", - "log", - "tokio", - "tungstenite 0.27.0", -] - [[package]] name = "tokio-tungstenite" version = "0.28.0" @@ -1738,7 +1711,7 @@ dependencies = [ "futures-util", "log", "tokio", - "tungstenite 0.28.0", + "tungstenite", ] [[package]] @@ -1919,23 +1892,6 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "tungstenite" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eadc29d668c91fcc564941132e17b28a7ceb2f3ebf0b9dae3e03fd7a6748eb0d" -dependencies = [ - "bytes", - "data-encoding", - "http", - "httparse", - "log", - "rand", - "sha1", - "thiserror", - "utf-8", -] - [[package]] name = "tungstenite" version = "0.28.0" diff --git a/samod-core/Cargo.toml b/samod-core/Cargo.toml index f8c75f8..cb767b4 100644 --- a/samod-core/Cargo.toml +++ b/samod-core/Cargo.toml @@ -11,14 +11,14 @@ license = "MIT" base64 = "0.21" tracing = "0.1.41" uuid = { version = "1.0", features = ["v4", "serde"] } -rand = "0.9" +rand = "0.9.2" automerge = { workspace = true } serde = { version = "1.0", features = ["derive"] } hex = "0.4" minicbor = { version = "1.0.0", features = ["std"] } thiserror = "2.0.12" -bs58 = { version = "0.5.1", features = ["check"] } -sha2 = "0.10.9" +b58 = "0.1.2" +sha2 = "0.11.0-rc.3" [lib] diff --git a/samod-core/src/document_id.rs b/samod-core/src/document_id.rs index 50bb373..4481dfe 100644 --- a/samod-core/src/document_id.rs +++ b/samod-core/src/document_id.rs @@ -25,14 +25,14 @@ impl DocumentId { impl std::fmt::Debug for DocumentId { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let as_string = bs58::encode(&self.0).with_check().into_string(); + let as_string = b58::encode(&self.as_bytes()).to_string(); write!(f, "{as_string}") } } impl std::fmt::Display for DocumentId { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let as_string = bs58::encode(&self.0).with_check().into_string(); + let as_string = b58::encode(&self.as_bytes()).to_string(); write!(f, "{as_string}") } } @@ -56,7 +56,7 @@ impl FromStr for DocumentId { type Err = BadDocumentId; fn from_str(s: &str) -> Result { - match bs58::decode(s).with_check(None).into_vec() { + match b58::decode(s) { Ok(bytes) => Self::try_from(bytes), Err(_) => { // attempt to parse legacy UUID format diff --git a/samod/Cargo.toml b/samod/Cargo.toml index 5217e89..be92896 100644 --- a/samod/Cargo.toml +++ b/samod/Cargo.toml @@ -20,17 +20,17 @@ axum = { version = "0.8.4", optional = true, features = ["ws"] } bytes = "1.10.1" chrono = "0.4.41" futures = "0.3.31" -rand = "0.9.1" +rand = "0.9.2" rayon = { version = "1.10.0", optional = true } samod-core = { path = "../samod-core", version = "0.6.1" } tokio = { version = "1.46.0", features = ["rt", "time", "fs"], optional = true } -tokio-tungstenite = { version = "0.27.0", optional = true } +tokio-tungstenite = { version = "0.28.0", optional = true } tokio-util = { version = "0.7.15", features = [ "codec", "net", ], optional = true } tracing = "0.1.41" -tungstenite = { version = "0.27.0", optional = true } +tungstenite = { version = "0.28.0", optional = true } gio = { version = "0.20.12", optional = true } glib = { version = "0.20.12", optional = true } async-channel = "2.5.0" From 02e7e670e6abad382a5f4d7fafb55140917e94fd Mon Sep 17 00:00:00 2001 From: Lilith Silver <84940819+LilithSilver@users.noreply.github.com> Date: Wed, 7 Jan 2026 12:29:38 -0800 Subject: [PATCH 2/4] Add GitHub ci action for docs.rs building --- .github/workflows/ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0559e73..e3b9087 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,17 @@ env: CARGO_TERM_COLOR: always jobs: + # see: https://github.com/dtolnay/cargo-docs-rs + doc: + name: Documentation + runs-on: ubuntu-latest + env: + RUSTDOCFLAGS: -Dwarnings + steps: + - uses: actions/checkout@v5 + - uses: dtolnay/rust-toolchain@nightly + - uses: dtolnay/install@cargo-docs-rs + - run: cargo docs-rs ci: runs-on: ubuntu-latest From c414e2ff3020952699c09a2614c0a6132db12ad8 Mon Sep 17 00:00:00 2001 From: Lilith Silver <84940819+LilithSilver@users.noreply.github.com> Date: Wed, 7 Jan 2026 13:38:04 -0800 Subject: [PATCH 3/4] fix clippy issue --- samod-core/src/document_id.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samod-core/src/document_id.rs b/samod-core/src/document_id.rs index 4481dfe..6aa0835 100644 --- a/samod-core/src/document_id.rs +++ b/samod-core/src/document_id.rs @@ -25,14 +25,14 @@ impl DocumentId { impl std::fmt::Debug for DocumentId { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let as_string = b58::encode(&self.as_bytes()).to_string(); + let as_string = b58::encode(self.as_bytes()).to_string(); write!(f, "{as_string}") } } impl std::fmt::Display for DocumentId { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let as_string = b58::encode(&self.as_bytes()).to_string(); + let as_string = b58::encode(self.as_bytes()).to_string(); write!(f, "{as_string}") } } From d426b6843564eecd18b79d8322eacf68ace74128 Mon Sep 17 00:00:00 2001 From: Lilith Silver <84940819+LilithSilver@users.noreply.github.com> Date: Wed, 7 Jan 2026 13:38:20 -0800 Subject: [PATCH 4/4] Fix gh CI --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3b9087..eecc546 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,9 @@ jobs: - uses: actions/checkout@v5 - uses: dtolnay/rust-toolchain@nightly - uses: dtolnay/install@cargo-docs-rs - - run: cargo docs-rs + - run: cargo docs-rs -p samod + - run: cargo docs-rs -p samod-core + - run: cargo docs-rs -p samod-test-harness ci: runs-on: ubuntu-latest