-
Notifications
You must be signed in to change notification settings - Fork 315
feat(ffi): Add ability to configure indexedb instead of sqlite for wasm platforms #5181
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
Changes from 1 commit
9ace356
8196842
b810233
43911b8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,17 +14,17 @@ publish = false | |
release = true | ||
|
||
[lib] | ||
crate-type = ["cdylib", "staticlib"] | ||
crate-type = ["cdylib", "staticlib", "lib"] | ||
|
||
[features] | ||
default = ["bundled-sqlite", "unstable-msc4274"] | ||
bundled-sqlite = ["matrix-sdk/bundled-sqlite"] | ||
unstable-msc4274 = ["matrix-sdk-ui/unstable-msc4274"] | ||
js = [] | ||
|
||
[dependencies] | ||
anyhow.workspace = true | ||
as_variant.workspace = true | ||
async-compat = "0.2.4" | ||
extension-trait = "1.0.1" | ||
eyeball-im.workspace = true | ||
futures-util.workspace = true | ||
|
@@ -36,21 +36,18 @@ matrix-sdk-ui = { workspace = true, features = ["uniffi"] } | |
mime = "0.3.16" | ||
once_cell.workspace = true | ||
ruma = { workspace = true, features = ["html", "unstable-unspecified", "unstable-msc3488", "compat-unset-avatar", "unstable-msc3245-v1-compat", "unstable-msc4278"] } | ||
sentry-tracing = "0.36.0" | ||
serde.workspace = true | ||
serde_json.workspace = true | ||
thiserror.workspace = true | ||
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] } | ||
tracing.workspace = true | ||
tracing-appender = { version = "0.2.2" } | ||
tracing-core.workspace = true | ||
tracing-subscriber = { workspace = true, features = ["env-filter"] } | ||
uniffi = { workspace = true, features = ["tokio"] } | ||
url.workspace = true | ||
uuid = { version = "1.4.1", features = ["v4"] } | ||
zeroize.workspace = true | ||
|
||
[target.'cfg(not(target_os = "android"))'.dependencies.matrix-sdk] | ||
[target.'cfg(all(not(target_os = "android"), not(target_family = "wasm")))'.dependencies.matrix-sdk] | ||
workspace = true | ||
features = [ | ||
"anyhow", | ||
|
@@ -64,7 +61,7 @@ features = [ | |
"uniffi", | ||
] | ||
|
||
[target.'cfg(not(target_os = "android"))'.dependencies.sentry] | ||
[target.'cfg(all(not(target_os = "android"), not(target_family = "wasm")))'.dependencies.sentry] | ||
version = "0.36.0" | ||
default-features = false | ||
features = [ | ||
|
@@ -77,6 +74,31 @@ features = [ | |
"reqwest", | ||
] | ||
|
||
[target.'cfg(target_family = "wasm")'.dependencies] | ||
matrix-sdk-ui = { workspace = true, features = ["js", "uniffi"] } | ||
tokio = { workspace = true, features = ["sync", "macros"] } | ||
uniffi = { workspace = true, features = [] } | ||
|
||
[target.'cfg(target_family = "wasm")'.dependencies.matrix-sdk] | ||
workspace = true | ||
features = [ | ||
"anyhow", | ||
"e2e-encryption", | ||
"experimental-widgets", | ||
"markdown", | ||
"rustls-tls", | ||
"socks", | ||
"indexeddb", | ||
"uniffi", | ||
] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All the changes in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Opened up #5211 which is nearly merged. I will rebase this branch with those changes (and other feedback) once it lands. |
||
|
||
[target.'cfg(not(target_family = "wasm"))'.dependencies] | ||
async-compat.workspace = true | ||
matrix-sdk-ui = { workspace = true, features = ["uniffi"] } | ||
sentry-tracing = "0.36.0" | ||
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] } | ||
uniffi = { workspace = true, features = ["tokio"] } | ||
|
||
[target.'cfg(target_os = "android")'.dependencies] | ||
paranoid-android = "0.2.1" | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure it's related to what the patch says it does. Can you split this in another patch please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this seems weird, what's the idea with this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The uniffi bindings generator requires the library to be built as a "lib" so it can be included in a second generated-rust library that is fed through. But I will break that out into a second PR.