Skip to content

Commit 7863cb8

Browse files
committed
mls-storage: make aes-gcm optional and add test-utils feature
Signed-off-by: Yuki Kishimoto <[email protected]>
1 parent 267fe47 commit 7863cb8

File tree

6 files changed

+11
-9
lines changed

6 files changed

+11
-9
lines changed

Cargo.lock

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ openmls_memory_storage = { version = "0.4.0", default-features = false }
2020
parking_lot = "0.12"
2121

2222
[dev-dependencies]
23-
aes-gcm = "0.10.3"
23+
nostr-mls-storage = { workspace = true, features = ["test-utils"] }

mls/nostr-mls-sqlite-storage/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ serde_json.workspace = true
2323
tracing = { workspace = true, features = ["std"] }
2424

2525
[dev-dependencies]
26-
aes-gcm = "0.10.3"
26+
nostr-mls-storage = { workspace = true, features = ["test-utils"] }
2727
tempfile.workspace = true

mls/nostr-mls-storage/Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@ readme = "README.md"
1111
rust-version = "1.74.0"
1212
keywords = ["nostr", "mls", "openmls"]
1313

14+
[features]
15+
default = []
16+
# Enabld test utils module
17+
test-utils = ["dep:aes-gcm"]
18+
1419
[dependencies]
15-
aes-gcm = "0.10"
20+
aes-gcm = { version = "0.10", optional = true }
1621
nostr = { workspace = true, features = ["std"] }
1722
openmls = { version = "0.7.0", default-features = false }
1823
openmls_traits = { version = "0.4.0", default-features = false }

mls/nostr-mls-storage/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ use openmls_traits::storage::StorageProvider;
99

1010
pub mod groups;
1111
pub mod messages;
12-
pub mod welcomes;
13-
12+
#[cfg(feature = "test-utils")]
1413
pub mod test_utils;
14+
pub mod welcomes;
1515

1616
use self::groups::GroupStorage;
1717
use self::messages::MessageStorage;

mls/nostr-mls/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ rust-version = "1.74.0"
1212
keywords = ["nostr", "mls", "openmls"]
1313

1414
[dependencies]
15-
aes-gcm = "0.10.3"
1615
hex = { workspace = true, features = ["std"] }
1716
nostr = { workspace = true, features = ["std", "nip44"] }
1817
nostr-mls-storage.workspace = true
@@ -24,6 +23,7 @@ tls_codec = "0.4"
2423
tracing = { workspace = true, features = ["std"] }
2524

2625
[dev-dependencies]
26+
nostr-mls-storage = { workspace = true, features = ["test-utils"] }
2727
nostr-mls-memory-storage.workspace = true
2828
nostr-mls-sqlite-storage.workspace = true
2929
rand = "0.9.2"

0 commit comments

Comments
 (0)