refactor: move examples from crates/matrix-sdk into separate crates in examples/

This commit is contained in:
Benjamin Kampmann
2022-08-02 15:06:04 +02:00
parent 6cb87c64b5
commit 4c7ddd7512
25 changed files with 120 additions and 15 deletions
+1
View File
@@ -7,6 +7,7 @@ members = [
"bindings/matrix-sdk-ffi",
"crates/*",
"testing/*",
"examples/*",
"labs/*",
"xtask",
]
-12
View File
@@ -149,15 +149,3 @@ wasm-bindgen-test = "0.3.30"
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
tokio = { version = "1.17.0", default-features = false, features = ["rt-multi-thread", "macros"] }
wiremock = "0.5.13"
[[example]]
name = "cross_signing_bootstrap"
required-features = ["e2e-encryption"]
[[example]]
name = "emoji_verification"
required-features = ["e2e-encryption"]
[[example]]
name = "timeline"
required-features = ["sled", "experimental-timeline"]
+13
View File
@@ -0,0 +1,13 @@
[package]
name = "example-autojoin"
version = "0.1.0"
edition = "2021"
publish = false
[dependencies]
tokio = { version = "1.20.1", features = ["full"] }
anyhow = "1"
tracing-subscriber = "0.3.15"
[dependencies.matrix-sdk]
path = "../../crates/matrix-sdk"
+14
View File
@@ -0,0 +1,14 @@
[package]
name = "example-command-bot"
version = "0.1.0"
edition = "2021"
publish = false
[dependencies]
anyhow = "1"
tokio = { version = "1.20.1", features = ["full"] }
tracing-subscriber = "0.3.15"
url = "2.2.2"
[dependencies.matrix-sdk]
path = "../../crates/matrix-sdk"
@@ -0,0 +1,16 @@
[package]
name = "example-cross-signing-bootstrap"
version = "0.1.0"
edition = "2021"
publish = false
[dependencies]
anyhow = "1"
tokio = { version = "1.20.1", features = ["full"] }
tracing-subscriber = "0.3.15"
url = "2.2.2"
[dependencies.matrix-sdk]
path = "../../crates/matrix-sdk"
version = "0.5.0"
features = ["e2e-encryption"]
+16
View File
@@ -0,0 +1,16 @@
[package]
name = "example-emoji-verification"
version = "0.1.0"
edition = "2021"
publish = false
[dependencies]
anyhow = "1"
tokio = { version = "1.20.1", features = ["full"] }
tracing-subscriber = "0.3.15"
url = "2.2.2"
[dependencies.matrix-sdk]
path = "../../crates/matrix-sdk"
version = "0.5.0"
features = ["e2e-encryption"]
+14
View File
@@ -0,0 +1,14 @@
[package]
name = "example-get-profiles"
version = "0.1.0"
edition = "2021"
publish = false
[dependencies]
anyhow = "1"
tokio = { version = "1.20.1", features = ["full"] }
tracing-subscriber = "0.3.15"
url = "2.2.2"
[dependencies.matrix-sdk]
path = "../../crates/matrix-sdk"
+15
View File
@@ -0,0 +1,15 @@
[package]
name = "example-image-bot"
version = "0.1.0"
edition = "2021"
publish = false
[dependencies]
anyhow = "1"
mime = "0.3.16"
tokio = { version = "1.20.1", features = ["full"] }
tracing-subscriber = "0.3.15"
url = "2.2.2"
[dependencies.matrix-sdk]
path = "../../crates/matrix-sdk"
+14
View File
@@ -0,0 +1,14 @@
[package]
name = "example-login"
version = "0.1.0"
edition = "2021"
publish = false
[dependencies]
anyhow = "1"
tokio = { version = "1.20.1", features = ["full"] }
tracing-subscriber = "0.3.15"
url = "2.2.2"
[dependencies.matrix-sdk]
path = "../../crates/matrix-sdk"
+16
View File
@@ -0,0 +1,16 @@
[package]
name = "example-timeline"
version = "0.1.0"
edition = "2021"
publish = false
[dependencies]
anyhow = "1"
futures = "0.3"
tokio = { version = "1.20.1", features = ["full"] }
tracing-subscriber = "0.3.15"
url = "2.2.2"
[dependencies.matrix-sdk]
path = "../../crates/matrix-sdk"
features = ["sled", "experimental-timeline"]
@@ -18,12 +18,10 @@ console_error_panic_hook = "0.1.6"
web-sys = { version = "0.3.51", features = ["console"] }
[dependencies.matrix-sdk]
path = "../.."
path = "../../crates/matrix-sdk"
version = "0.5.0"
default-features = false
features = ["native-tls", "e2e-encryption", "indexeddb"]
[workspace]
[dev-dependencies]
wasm-bindgen-test = "0.3.29"