Move ruma re-export from matrix-sdk-common to matrix-sdk

master
Jonas Platte 2021-06-07 17:33:08 +02:00
parent 54063513a3
commit 1168c39c20
No known key found for this signature in database
GPG Key ID: 7D261D771D915378
5 changed files with 32 additions and 46 deletions

View File

@ -26,7 +26,7 @@ rustls-tls = ["reqwest/rustls-tls"]
socks = ["reqwest/socks"]
sso_login = ["warp", "rand", "tokio-stream"]
require_auth_for_profile_requests = []
appservice = ["matrix-sdk-common/appservice", "ruma/appservice-api-s", "ruma/appservice-api-helper", "ruma/rand"]
appservice = ["ruma/appservice-api-s", "ruma/appservice-api-helper", "ruma/rand"]
docs = ["encryption", "sled_cryptostore", "sled_state_store", "sso_login"]
@ -56,7 +56,7 @@ default_features = false
[dependencies.ruma]
version = "0.1.2"
features = ["client-api-c", "unstable-pre-spec"]
features = ["client-api-c", "compat", "unstable-pre-spec"]
[dependencies.tokio-stream]
version = "0.1.4"

View File

@ -85,6 +85,23 @@ pub use matrix_sdk_base::{
};
pub use matrix_sdk_common::*;
pub use reqwest;
#[cfg(feature = "appservice")]
pub use ruma::{
api::{appservice as api_appservice, IncomingRequest, OutgoingRequestAppserviceExt},
serde::{exports::serde::de::value::Error as SerdeError, urlencoded},
};
pub use ruma::{
api::{
client as api,
error::{
FromHttpRequestError, FromHttpResponseError, IntoHttpError, MatrixError, ServerError,
},
AuthScheme, EndpointError, IncomingResponse, OutgoingRequest, SendAccessToken,
},
assign, directory, encryption, events, identifiers, int, presence, push, receipt,
serde::{CanonicalJsonValue, Raw},
thirdparty, uint, Int, MilliSecondsSinceUnixEpoch, Outgoing, SecondsSinceUnixEpoch, UInt,
};
mod client;
mod error;

View File

@ -10,18 +10,11 @@ readme = "README.md"
repository = "https://github.com/matrix-org/matrix-rust-sdk"
version = "0.2.0"
[features]
markdown = ["ruma/markdown"]
appservice = ["ruma/appservice-api", "ruma/appservice-api-helper", "ruma/rand"]
[dependencies]
instant = { version = "0.1.9", features = ["wasm-bindgen", "now"] }
serde = "1.0.122"
async-trait = "0.1.42"
[dependencies.ruma]
version = "0.1.0"
features = ["client-api-c", "compat", "unstable-pre-spec"]
instant = { version = "0.1.9", features = ["wasm-bindgen", "now"] }
ruma = { version = "0.1.2", features = ["client-api-c"] }
serde = "1.0.122"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
uuid = { version = "0.8.2", default-features = false, features = ["v4", "serde"] }
@ -29,7 +22,7 @@ uuid = { version = "0.8.2", default-features = false, features = ["v4", "serde"]
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio]
version = "1.1.0"
default-features = false
features = ["sync"]
features = ["rt", "sync"]
[target.'cfg(target_arch = "wasm32")'.dependencies]
futures = "0.3.12"

View File

@ -1,20 +1,11 @@
use std::{collections::BTreeMap, convert::TryFrom};
use ruma::{
api::client::r0::sync::sync_events::{
Ephemeral, InvitedRoom, Presence, RoomAccountData, State, ToDevice,
},
serde::Raw,
DeviceIdBox,
};
use serde::{Deserialize, Serialize};
use super::{
api::r0::{
api::client::r0::{
push::get_notifications::Notification,
sync::sync_events::{
DeviceLists, GlobalAccountData,
UnreadNotificationsCount as RumaUnreadNotificationsCount,
DeviceLists, Ephemeral, GlobalAccountData, InvitedRoom, Presence, RoomAccountData,
State, ToDevice, UnreadNotificationsCount as RumaUnreadNotificationsCount,
},
},
events::{
@ -22,8 +13,10 @@ use super::{
SyncStateEvent, Unsigned,
},
identifiers::{DeviceKeyAlgorithm, EventId, RoomId, UserId},
MilliSecondsSinceUnixEpoch,
serde::Raw,
DeviceIdBox, MilliSecondsSinceUnixEpoch,
};
use serde::{Deserialize, Serialize};
/// A change in ambiguity of room members that an `m.room.member` event
/// triggers.
@ -258,7 +251,7 @@ pub struct MemberEvent {
}
impl TryFrom<SyncStateEvent<MemberEventContent>> for MemberEvent {
type Error = super::identifiers::Error;
type Error = ruma::identifiers::Error;
fn try_from(event: SyncStateEvent<MemberEventContent>) -> Result<Self, Self::Error> {
Ok(MemberEvent {
@ -274,7 +267,7 @@ impl TryFrom<SyncStateEvent<MemberEventContent>> for MemberEvent {
}
impl TryFrom<StateEvent<MemberEventContent>> for MemberEvent {
type Error = super::identifiers::Error;
type Error = ruma::identifiers::Error;
fn try_from(event: StateEvent<MemberEventContent>) -> Result<Self, Self::Error> {
Ok(MemberEvent {
@ -315,7 +308,7 @@ pub struct StrippedMemberEvent {
}
impl TryFrom<StrippedStateEvent<MemberEventContent>> for StrippedMemberEvent {
type Error = super::identifiers::Error;
type Error = ruma::identifiers::Error;
fn try_from(event: StrippedStateEvent<MemberEventContent>) -> Result<Self, Self::Error> {
Ok(StrippedMemberEvent {

View File

@ -1,22 +1,5 @@
pub use async_trait::async_trait;
pub use instant;
#[cfg(feature = "appservice")]
pub use ruma::{
api::{appservice as api_appservice, IncomingRequest, OutgoingRequestAppserviceExt},
serde::{exports::serde::de::value::Error as SerdeError, urlencoded},
};
pub use ruma::{
api::{
client as api,
error::{
FromHttpRequestError, FromHttpResponseError, IntoHttpError, MatrixError, ServerError,
},
AuthScheme, EndpointError, IncomingResponse, OutgoingRequest, SendAccessToken,
},
assign, directory, encryption, events, identifiers, int, presence, push, receipt,
serde::{CanonicalJsonValue, Raw},
thirdparty, uint, Int, MilliSecondsSinceUnixEpoch, Outgoing, SecondsSinceUnixEpoch, UInt,
};
pub use uuid;
pub mod deserialized_responses;