Skip to content

Commit 23c3526

Browse files
erskingardneryukibtc
authored andcommitted
mls-sqlite-storage: add SQLite implementation for MLS
Pull-Request: rust-nostr#842 Reviewed-by: Yuki Kishimoto <[email protected]> Signed-off-by: Yuki Kishimoto <[email protected]>
1 parent d0ebec7 commit 23c3526

File tree

18 files changed

+1866
-25
lines changed

18 files changed

+1866
-25
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
* blossom: add new crate with Blossom support ([Daniel D’Aquino] at https://github.com/rust-nostr/nostr/pull/838)
3333
* mls-storage: add new crate with traits and types for mls storage implementations ([JeffG] at https://github.com/rust-nostr/nostr/pull/836)
3434
* mls-memory-storage: add an in-memory implementation for MLS ([JeffG] at https://github.com/rust-nostr/nostr/pull/839)
35+
* mls-sqlite-storage: a sqlite implementation for MLS ([JeffG] at https://github.com/rust-nostr/nostr/pull/842)
3536

3637
## v0.41.0 - 2025/04/15
3738

Cargo.lock

Lines changed: 117 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ nostr-database = { version = "0.41", path = "./crates/nostr-database", default-f
2626
nostr-indexeddb = { version = "0.41", path = "./crates/nostr-indexeddb", default-features = false }
2727
nostr-lmdb = { version = "0.41", path = "./crates/nostr-lmdb", default-features = false }
2828
nostr-mls-memory-storage = { version = "0.41", path = "./crates/nostr-mls-memory-storage", default-features = false }
29+
nostr-mls-sqlite-storage = { version = "0.41", path = "./crates/nostr-mls-sqlite-storage", default-features = false }
2930
nostr-mls-storage = { version = "0.41", path = "./crates/nostr-mls-storage", default-features = false }
3031
nostr-ndb = { version = "0.41", path = "./crates/nostr-ndb", default-features = false }
3132
nostr-relay-builder = { version = "0.41", path = "./crates/nostr-relay-builder", default-features = false }

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ The project is split up into several crates in the `crates/` directory:
1414
* [**nostr-indexeddb**](./crates/nostr-indexeddb): IndexedDB storage backend
1515
* [**nostr-mls-storage**](./crates/nostr-mls-storage): Storage traits for using MLS messaging
1616
* [**nostr-mls-memory-storage**](./crates/nostr-mls-memory-storage): In-memory storage for nostr-mls
17+
* [**nostr-mls-sqlite-storage**](./crates/nostr-mls-sqlite-storage): Sqlite storage for nostr-mls
1718
* [**nostr-keyring**](./crates/nostr-keyring): Nostr Keyring
1819
* [**nostr-relay-pool**](./crates/nostr-relay-pool): Nostr Relay Pool
1920
* [**nostr-sdk**](./crates/nostr-sdk): High level client library

contrib/scripts/check-crates.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ buildargs=(
4343
"-p nostr-lmdb"
4444
"-p nostr-mls-storage"
4545
"-p nostr-mls-memory-storage"
46+
"-p nostr-mls-sqlite-storage"
4647
"-p nostr-indexeddb --target wasm32-unknown-unknown"
4748
"-p nostr-ndb"
4849
"-p nostr-keyring"
@@ -62,6 +63,7 @@ skip_msrv=(
6263
"-p nostr-lmdb" # MSRV: 1.72.0
6364
"-p nostr-mls-storage" # MSRV: 1.74.0
6465
"-p nostr-mls-memory-storage" # MSRV: 1.74.0
66+
"-p nostr-mls-sqlite-storage" # MSRV: 1.74.0
6567
"-p nostr-keyring" # MSRV: 1.75.0
6668
"-p nostr-keyring --features async" # MSRV: 1.75.0
6769
"-p nostr-sdk --features tor" # MSRV: 1.77.0

contrib/scripts/release.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ args=(
88
"-p nostr-lmdb"
99
"-p nostr-mls-storage"
1010
"-p nostr-mls-memory-storage"
11+
"-p nostr-mls-sqlite-storage"
1112
"-p nostr-ndb"
1213
"-p nostr-indexeddb"
1314
"-p nostr-keyring"

crates/nostr-mls-memory-storage/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ keywords = ["nostr", "mls", "openmls", "memory"]
1515
lru.workspace = true
1616
nostr = { workspace = true, features = ["std"] }
1717
nostr-mls-storage.workspace = true
18-
openmls_memory_storage = { version = "0.3", default-features = false }
18+
openmls_memory_storage = { git = "https://github.com/erskingardner/openmls", rev = "88309e1bc79c129628f35c55e838be2d7277c335", default-features = false }
1919
parking_lot = "0.12"
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[package]
2+
name = "nostr-mls-sqlite-storage"
3+
version = "0.41.0"
4+
edition = "2021"
5+
description = "Sqlite database for nostr-mls that implements the NostrMlsStorageProvider Trait"
6+
authors = ["Jeff Gardner <[email protected]>", "Yuki Kishimoto <[email protected]>", "Rust Nostr Developers"]
7+
homepage.workspace = true
8+
repository.workspace = true
9+
license.workspace = true
10+
readme = "README.md"
11+
rust-version = "1.74.0"
12+
keywords = ["nostr", "mls", "openmls", "sqlite"]
13+
14+
[dependencies]
15+
nostr = { workspace = true, features = ["std"] }
16+
nostr-mls-storage.workspace = true
17+
openmls_sqlite_storage = { git = "https://github.com/erskingardner/openmls", rev = "88309e1bc79c129628f35c55e838be2d7277c335", default-features = false }
18+
refinery = { version = "0.8", features = ["rusqlite"] } # MSRV is 1.75.0
19+
rusqlite = { version = "0.32", features = ["bundled"] }
20+
serde = { workspace = true, features = ["derive"] }
21+
serde_json.workspace = true
22+
tracing = { workspace = true, features = ["std"] }
23+
24+
[dev-dependencies]
25+
tempfile = "3.19.1"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Nostr MLS Sqlite Storage
2+
3+
Sqlite MLS storage backend for nostr apps
4+
5+
## State
6+
7+
**This library is in an ALPHA state**, things that are implemented generally work but the API will change in breaking ways.
8+
9+
## Donations
10+
11+
`rust-nostr` is free and open-source. This means we do not earn any revenue by selling it. Instead, we rely on your financial support. If you actively use any of the `rust-nostr` libs/software/services, then please [donate](https://rust-nostr.org/donate).
12+
13+
## License
14+
15+
This project is distributed under the MIT software license - see the [LICENSE](../../LICENSE) file for details

0 commit comments

Comments
 (0)