@@ -14,17 +14,17 @@ publish = false
14
14
release = true
15
15
16
16
[lib ]
17
- crate-type = [" cdylib" , " staticlib" ]
17
+ crate-type = [" cdylib" , " staticlib" , " lib " ]
18
18
19
19
[features ]
20
20
default = [" bundled-sqlite" , " unstable-msc4274" ]
21
21
bundled-sqlite = [" matrix-sdk/bundled-sqlite" ]
22
22
unstable-msc4274 = [" matrix-sdk-ui/unstable-msc4274" ]
23
+ js = []
23
24
24
25
[dependencies ]
25
26
anyhow.workspace = true
26
27
as_variant.workspace = true
27
- async-compat = " 0.2.4"
28
28
extension-trait = " 1.0.1"
29
29
eyeball-im.workspace = true
30
30
futures-util.workspace = true
@@ -36,21 +36,18 @@ matrix-sdk-ui = { workspace = true, features = ["uniffi"] }
36
36
mime = " 0.3.16"
37
37
once_cell.workspace = true
38
38
ruma = { workspace = true , features = [" html" , " unstable-unspecified" , " unstable-msc3488" , " compat-unset-avatar" , " unstable-msc3245-v1-compat" , " unstable-msc4278" ] }
39
- sentry-tracing = " 0.36.0"
40
39
serde.workspace = true
41
40
serde_json.workspace = true
42
41
thiserror.workspace = true
43
- tokio = { workspace = true , features = [" rt-multi-thread" , " macros" ] }
44
42
tracing.workspace = true
45
43
tracing-appender = { version = " 0.2.2" }
46
44
tracing-core.workspace = true
47
45
tracing-subscriber = { workspace = true , features = [" env-filter" ] }
48
- uniffi = { workspace = true , features = [" tokio" ] }
49
46
url.workspace = true
50
47
uuid = { version = " 1.4.1" , features = [" v4" ] }
51
48
zeroize.workspace = true
52
49
53
- [target .'cfg(not(target_os = "android"))' .dependencies .matrix-sdk ]
50
+ [target .'cfg(all( not(target_os = "android"), not(target_family = "wasm") ))' .dependencies .matrix-sdk ]
54
51
workspace = true
55
52
features = [
56
53
" anyhow" ,
@@ -64,7 +61,7 @@ features = [
64
61
" uniffi" ,
65
62
]
66
63
67
- [target .'cfg(not(target_os = "android"))' .dependencies .sentry ]
64
+ [target .'cfg(all( not(target_os = "android"), not(target_family = "wasm") ))' .dependencies .sentry ]
68
65
version = " 0.36.0"
69
66
default-features = false
70
67
features = [
@@ -77,6 +74,31 @@ features = [
77
74
" reqwest" ,
78
75
]
79
76
77
+ [target .'cfg(target_family = "wasm")' .dependencies ]
78
+ matrix-sdk-ui = { workspace = true , features = [" js" , " uniffi" ] }
79
+ tokio = { workspace = true , features = [" sync" , " macros" ] }
80
+ uniffi = { workspace = true , features = [] }
81
+
82
+ [target .'cfg(target_family = "wasm")' .dependencies .matrix-sdk ]
83
+ workspace = true
84
+ features = [
85
+ " anyhow" ,
86
+ " e2e-encryption" ,
87
+ " experimental-widgets" ,
88
+ " markdown" ,
89
+ " rustls-tls" ,
90
+ " socks" ,
91
+ " indexeddb" ,
92
+ " uniffi" ,
93
+ ]
94
+
95
+ [target .'cfg(not(target_family = "wasm"))' .dependencies ]
96
+ async-compat.workspace = true
97
+ matrix-sdk-ui = { workspace = true , features = [" uniffi" ] }
98
+ sentry-tracing = " 0.36.0"
99
+ tokio = { workspace = true , features = [" rt-multi-thread" , " macros" ] }
100
+ uniffi = { workspace = true , features = [" tokio" ] }
101
+
80
102
[target .'cfg(target_os = "android")' .dependencies ]
81
103
paranoid-android = " 0.2.1"
82
104
0 commit comments