diff --git a/crates/ruma-client/Cargo.toml b/crates/ruma-client/Cargo.toml index f7857593..dc55d580 100644 --- a/crates/ruma-client/Cargo.toml +++ b/crates/ruma-client/Cargo.toml @@ -50,19 +50,4 @@ serde = { version = "1.0.118", features = ["derive"] } serde_json = "1.0.61" [dev-dependencies] -anyhow = "1.0.37" -ruma = { version = "0.0.3", path = "../ruma", features = ["client-api-c"] } -tokio = { version = "1.0.1", features = ["macros", "rt"] } -tokio-stream = { version = "0.1.1", default-features = false } - -[[example]] -name = "hello_world" -required-features = ["client-api", "hyper-native-tls"] - -[[example]] -name = "hello_isahc" -required-features = ["client-api", "isahc"] - -[[example]] -name = "message_log" -required-features = ["client-api", "hyper-native-tls"] +ruma-client-api = { version = "0.10.0", path = "../ruma-client-api", features = ["client"] } diff --git a/crates/ruma-client/src/lib.rs b/crates/ruma-client/src/lib.rs index e1172fa4..69fbaca3 100644 --- a/crates/ruma-client/src/lib.rs +++ b/crates/ruma-client/src/lib.rs @@ -56,10 +56,8 @@ //! # let client = MatrixClient::new(homeserver_url, None); //! use std::convert::TryFrom; //! -//! use ruma::{ -//! api::client::r0::alias::get_alias, -//! room_alias_id, room_id, -//! }; +//! use ruma_client_api::r0::alias::get_alias; +//! use ruma_identifiers::{room_alias_id, room_id}; //! //! async { //! let response = client diff --git a/crates/ruma/Cargo.toml b/crates/ruma/Cargo.toml index 9b2bde01..27386cd7 100644 --- a/crates/ruma/Cargo.toml +++ b/crates/ruma/Cargo.toml @@ -36,7 +36,11 @@ ruma-identity-service-api = { version = "0.1.0", path = "../ruma-identity-servic ruma-push-gateway-api = { version = "0.1.0", path = "../ruma-push-gateway-api", optional = true } [dev-dependencies] +anyhow = "1.0.37" +isahc = "1.3.1" serde = { version = "1.0.118", features = ["derive"] } +tokio = { version = "1.0.1", features = ["macros", "rt"] } +tokio-stream = { version = "0.1.1", default-features = false } [features] api = ["ruma-api"] @@ -134,3 +138,15 @@ unstable-pre-spec = [ #"ruma-identity-service-api/unstable-pre-spec", #"ruma-push-gateway-api/unstable-pre-spec", ] + +[[example]] +name = "hello_world" +required-features = ["client-api-c", "client-ext-client-api", "client-hyper-native-tls"] + +[[example]] +name = "hello_isahc" +required-features = ["client-api-c", "client-ext-client-api", "client-isahc"] + +[[example]] +name = "message_log" +required-features = ["client-api-c", "client-ext-client-api", "client-hyper-native-tls"] diff --git a/crates/ruma-client/examples/hello_isahc.rs b/crates/ruma/examples/hello_isahc.rs similarity index 92% rename from crates/ruma-client/examples/hello_isahc.rs rename to crates/ruma/examples/hello_isahc.rs index aa94628c..aa5e75a3 100644 --- a/crates/ruma-client/examples/hello_isahc.rs +++ b/crates/ruma/examples/hello_isahc.rs @@ -1,10 +1,6 @@ //! Same as the hello_world example, but using the isahc http client (a Rust wrapper around //! libcurl). -// "Undo" rename from `Cargo.toml` that only serves to make crate names available as a Cargo -// feature names. -extern crate isahc_crate as isahc; - use std::{convert::TryFrom, env, process::exit}; use ruma::{ diff --git a/crates/ruma-client/examples/hello_world.rs b/crates/ruma/examples/hello_world.rs similarity index 100% rename from crates/ruma-client/examples/hello_world.rs rename to crates/ruma/examples/hello_world.rs diff --git a/crates/ruma-client/examples/message_log.rs b/crates/ruma/examples/message_log.rs similarity index 100% rename from crates/ruma-client/examples/message_log.rs rename to crates/ruma/examples/message_log.rs