From 7dd086fcdca0ec2143b4c8bf06c69a10bb37431e Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Thu, 30 Mar 2023 15:37:57 +0200 Subject: [PATCH] Make sqlite bundling optional --- bindings/matrix-sdk-crypto-ffi/Cargo.toml | 4 ++++ bindings/matrix-sdk-crypto-nodejs/Cargo.toml | 5 +++-- bindings/matrix-sdk-ffi/Cargo.toml | 6 +++++- crates/matrix-sdk-sqlite/Cargo.toml | 3 ++- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/bindings/matrix-sdk-crypto-ffi/Cargo.toml b/bindings/matrix-sdk-crypto-ffi/Cargo.toml index 31ed0ecf1..8b3b5252b 100644 --- a/bindings/matrix-sdk-crypto-ffi/Cargo.toml +++ b/bindings/matrix-sdk-crypto-ffi/Cargo.toml @@ -12,6 +12,10 @@ publish = false [lib] crate-type = ["cdylib", "staticlib"] +[features] +default = ["bundled-sqlite"] +bundled-sqlite = ["matrix-sdk-sqlite/bundled"] + [dependencies] anyhow = { workspace = true } base64 = { workspace = true } diff --git a/bindings/matrix-sdk-crypto-nodejs/Cargo.toml b/bindings/matrix-sdk-crypto-nodejs/Cargo.toml index 15d4eca0d..e30e02fbd 100644 --- a/bindings/matrix-sdk-crypto-nodejs/Cargo.toml +++ b/bindings/matrix-sdk-crypto-nodejs/Cargo.toml @@ -18,7 +18,8 @@ rustdoc-args = ["--cfg", "docsrs"] crate-type = ["cdylib"] [features] -default = [] +default = ["bundled-sqlite"] +bundled-sqlite = ["matrix-sdk-sqlite/bundled"] qrcode = ["matrix-sdk-crypto/qrcode"] tracing = ["dep:tracing-subscriber"] @@ -33,7 +34,7 @@ napi-derive = "2.9.1" serde_json = { workspace = true } http = { workspace = true } tracing-subscriber = { version = "0.3", default-features = false, features = ["tracing-log", "time", "smallvec", "fmt", "env-filter"], optional = true } -vodozemac = { workspace = true, features = ["js"]} +vodozemac = { workspace = true, features = ["js"] } zeroize = { workspace = true } [build-dependencies] diff --git a/bindings/matrix-sdk-ffi/Cargo.toml b/bindings/matrix-sdk-ffi/Cargo.toml index 3482e941a..e5e84fd99 100644 --- a/bindings/matrix-sdk-ffi/Cargo.toml +++ b/bindings/matrix-sdk-ffi/Cargo.toml @@ -12,6 +12,10 @@ repository = "https://github.com/matrix-org/matrix-rust-sdk" [lib] crate-type = ["cdylib", "staticlib"] +[features] +default = ["bundled-sqlite"] +bundled-sqlite = ["matrix-sdk-sqlite/bundled"] + [build-dependencies] uniffi = { workspace = true, features = ["build"] } @@ -60,7 +64,7 @@ features = [ "experimental-sliding-sync", "experimental-timeline", "e2e-encryption", - "markdown", + "markdown", "socks", "rustls-tls", ] diff --git a/crates/matrix-sdk-sqlite/Cargo.toml b/crates/matrix-sdk-sqlite/Cargo.toml index 1f77625b6..ed0975886 100644 --- a/crates/matrix-sdk-sqlite/Cargo.toml +++ b/crates/matrix-sdk-sqlite/Cargo.toml @@ -10,6 +10,7 @@ rust-version = { workspace = true } [features] default = [] +bundled = ["rusqlite/bundled"] crypto-store = [ "dep:matrix-sdk-base", "dep:matrix-sdk-crypto", @@ -30,7 +31,7 @@ matrix-sdk-crypto = { version = "0.6.0", path = "../matrix-sdk-crypto", optional matrix-sdk-store-encryption = { version = "0.2.0", path = "../matrix-sdk-store-encryption" } rmp-serde = "1.1.1" ruma = { workspace = true } -rusqlite = { version = "0.28.0", features = ["bundled"] } +rusqlite = "0.28.0" serde = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true, features = ["fs"] }