Initial commit

This commit is contained in:
Jonas Platte 2020-06-05 00:01:12 +02:00
commit f74e9c4b9b
No known key found for this signature in database
GPG Key ID: 7D261D771D915378
3 changed files with 75 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/target
Cargo.lock

30
Cargo.toml Normal file
View File

@ -0,0 +1,30 @@
[package]
name = "ruma"
authors = ["Jonas Platte <jplatte@posteo.de>"]
categories = ["api-bindings", "web-programming"]
keywords = ["matrix", "chat", "messaging", "ruma"]
description = "Types and traits for working with the Matrix protocol."
documentation = "https://docs.rs/ruma-client-api"
homepage = "https://www.ruma.io/"
repository = "https://github.com/ruma/ruma"
readme = "README.md"
license = "MIT"
version = "0.1.0"
edition = "2018"
[features]
appservice-api = ["ruma-api", "ruma-appservice-api", "ruma-events"]
client-api = ["ruma-api", "ruma-client-api", "ruma-events"]
federation-api = ["ruma-api", "ruma-federation-api", "ruma-signatures"]
[dependencies]
ruma-common = "0.1.3"
ruma-identifiers = "0.16.2"
ruma-events = { version = "0.21.3", optional = true }
ruma-signatures = { version = "0.5.0", optional = true }
ruma-api = { version = "0.16.1", optional = true }
ruma-appservice-api = { version = "0.1.0", optional = true }
ruma-client-api = { version = "0.9.0", optional = true }
ruma-federation-api = { version = "0.0.2", optional = true }

43
src/lib.rs Normal file
View File

@ -0,0 +1,43 @@
//! Types and traits for working with the Matrix protocol.
//!
//! This crate re-exports things from all of the other ruma crates so you don't
//! have to manually keep all the versions in sync.
//!
//! Which crates are re-exported can be configured through cargo features.
//! Depending on which parts of Matrix are relevant to you, activate the
//! following features:
//!
//! * `client-api` for the client-server API
//! * `federation-api` for the server-server (federation) API
//! * `appservice-api` for the application service API
#![deny(missing_docs)]
pub use ruma_common::*;
#[doc(inline)]
pub use ruma_identifiers as identifiers;
#[cfg(feature = "ruma-events")]
#[doc(inline)]
pub use ruma_events as events;
#[cfg(feature = "ruma-signatures")]
#[doc(inline)]
pub use ruma_signatures as signatures;
/// Rust types for various Matrix APIs requests and responses and abstractions for them.
#[cfg(feature = "ruma-api")]
#[doc(inline)]
pub mod api {
// Everything except the `ruma_api!` macro
pub use ruma_api::{error, Endpoint, EndpointError, Metadata};
#[cfg(feature = "ruma-appservice-api")]
#[doc(inline)]
pub use ruma_appservice_api as appservice;
#[cfg(feature = "ruma-client-api")]
#[doc(inline)]
pub use ruma_client_api as client;
#[cfg(feature = "ruma-federation-api")]
#[doc(inline)]
pub use ruma_federation_api as federation;
}