Skip to content

feat(wasm): add feature support for indexedb and sqlite to matrix-sdk-ffi #5245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions bindings/matrix-sdk-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,24 @@ crate-type = [

[features]
default = ["bundled-sqlite", "unstable-msc4274"]
bundled-sqlite = ["matrix-sdk/bundled-sqlite"]
bundled-sqlite = ["sqlite", "matrix-sdk/bundled-sqlite"]
unstable-msc4274 = ["matrix-sdk-ui/unstable-msc4274"]
# Use indexeddb for session storage, supported only on Wasm platforms.
indexeddb = ["matrix-sdk/indexeddb"]
# Use sqlite for session storage, not supported on Wasm platforms.
sqlite = ["matrix-sdk/sqlite"]
# provide a unified API regardless of target platforms, for use with multi-target platforms like react-native
react-native = []
# Required when targeting a Javascript environment, like Wasm in a browser.
js = ["matrix-sdk-ui/js"]
js = ["matrix-sdk-ui/js", "uuid/js"]
# Use the TLS implementation provided by the host system, necessary on iOS and Wasm platforms.
native-tls = ["matrix-sdk/native-tls", "sentry?/native-tls"]
native-tls = ["matrix-sdk/native-tls", "sentry?/native-tls", "graphql_client/reqwest"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

# Use Rustls as the TLS implementation, necessary on Android platforms.
rustls-tls = ["matrix-sdk/rustls-tls", "sentry?/rustls"]
# Enable sentry error monitoring, not compatible with Wasm platforms.
rustls-tls = ["matrix-sdk/rustls-tls", "sentry?/rustls", "graphql_client/reqwest-rustls"]
# Enable sentry error monitoring, not compatible on Wasm platforms.
sentry = ["dep:sentry", "dep:sentry-tracing"]


[dependencies]
anyhow.workspace = true
as_variant.workspace = true
Expand All @@ -50,7 +57,6 @@ matrix-sdk = { workspace = true, features = [
"experimental-widgets",
"markdown",
"socks",
"sqlite",
"uniffi",
] }
matrix-sdk-common.workspace = true
Expand Down