Skip to content

Commit d6829bd

Browse files
Daniel SalinasDaniel Salinas
authored andcommitted
Flatten changes to support matrix-sdk-ffi with wasm
1 parent 71aa4e1 commit d6829bd

File tree

18 files changed

+358
-229
lines changed

18 files changed

+358
-229
lines changed

Cargo.lock

Lines changed: 32 additions & 0 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
@@ -3,6 +3,7 @@ members = [
33
"benchmarks",
44
"bindings/matrix-sdk-crypto-ffi",
55
"bindings/matrix-sdk-ffi",
6+
"bindings/matrix-sdk-ffi-web",
67
"crates/*",
78
"examples/*",
89
"labs/*",
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[package]
2+
name = "matrix-sdk-ffi-web"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]
7+
matrix-sdk-ffi = { path = "../matrix-sdk-ffi/", features = ["js"] }
8+
uniffi = { workspace = true }
9+
10+
[build-dependencies]
11+
uniffi = { workspace = true, features = ["build"] }
12+
13+
[dev-dependencies]
14+
uniffi = { workspace = true, features = ["bindgen-tests"] }
15+
16+
[lib]
17+
crate-type = ["lib", "staticlib", "cdylib"]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub use matrix_sdk_ffi;

bindings/matrix-sdk-ffi/Cargo.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,17 @@ publish = false
1414
release = true
1515

1616
[lib]
17-
crate-type = ["cdylib", "staticlib"]
17+
crate-type = ["lib", "cdylib", "staticlib"]
1818

1919
[features]
2020
default = ["bundled-sqlite", "unstable-msc4274"]
2121
bundled-sqlite = ["matrix-sdk/bundled-sqlite"]
2222
unstable-msc4274 = ["matrix-sdk-ui/unstable-msc4274"]
23-
wasm = []
23+
js = []
2424

2525
[dependencies]
2626
anyhow.workspace = true
2727
as_variant.workspace = true
28-
async-compat.workspace = true
2928
extension-trait = "1.0.1"
3029
eyeball-im.workspace = true
3130
futures-util.workspace = true
@@ -38,15 +37,13 @@ matrix-sdk-ui = { workspace = true, features = ["uniffi"] }
3837
mime = "0.3.16"
3938
once_cell.workspace = true
4039
ruma = { workspace = true, features = ["html", "unstable-unspecified", "unstable-msc3488", "compat-unset-avatar", "unstable-msc3245-v1-compat", "unstable-msc4278"] }
41-
sentry-tracing = "0.36.0"
4240
serde.workspace = true
4341
serde_json.workspace = true
4442
thiserror.workspace = true
4543
tracing.workspace = true
4644
tracing-appender = { version = "0.2.2" }
4745
tracing-core.workspace = true
4846
tracing-subscriber = { workspace = true, features = ["env-filter"] }
49-
uniffi = { workspace = true, features = ["tokio"] }
5047
url.workspace = true
5148
uuid = { version = "1.4.1", features = ["v4"] }
5249
zeroize.workspace = true
@@ -68,10 +65,13 @@ features = [
6865
paranoid-android = "0.2.1"
6966

7067
[target.'cfg(target_family = "wasm")'.dependencies]
68+
console_error_panic_hook = "0.1.7"
7169
tokio = { workspace = true, features = ["sync", "macros"] }
72-
uniffi = { workspace = true, features = ["tokio", "wasm-unstable-single-threaded"] }
70+
uniffi = { workspace = true, features = ["wasm-unstable-single-threaded"] }
7371

7472
[target.'cfg(not(target_family = "wasm"))'.dependencies]
73+
async-compat.workspace = true
74+
sentry-tracing = "0.36.0"
7575
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
7676
uniffi = { workspace = true, features = ["tokio"] }
7777

@@ -108,11 +108,11 @@ workspace = true
108108
features = [
109109
"anyhow",
110110
"e2e-encryption",
111-
"experimental-widgets",
111+
"experimental-widgets",
112112
"markdown",
113-
"native-tls", # note: differ from block below
113+
"rustls-tls",
114114
"socks",
115-
"indexeddb", # note: differ from block below
115+
"indexeddb",
116116
"uniffi",
117117
]
118118

0 commit comments

Comments
 (0)