diff --git a/Cargo.toml b/Cargo.toml index 9bdb87b6..a51c27d1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,6 @@ ruma-identifiers-validation = { version = "0.10.1", path = "crates/ruma-identifi ruma-identity-service-api = { version = "0.11.0", path = "crates/ruma-identity-service-api" } ruma-macros = { version = "=0.15.1", path = "crates/ruma-macros" } ruma-push-gateway-api = { version = "0.11.0", path = "crates/ruma-push-gateway-api" } -ruma-server-util = { version = "0.5.0", path = "crates/ruma-server-util" } ruma-signatures = { version = "0.17.0", path = "crates/ruma-signatures" } #ruma-state-res = { version = "0.11.0", path = "crates/ruma-state-res" } serde = { version = "1.0.164", features = ["derive"] } diff --git a/contrib/workspace_deps.png b/contrib/workspace_deps.png index dbedb311..a933c3b0 100644 Binary files a/contrib/workspace_deps.png and b/contrib/workspace_deps.png differ diff --git a/crates/ruma-federation-api/CHANGELOG.md b/crates/ruma-federation-api/CHANGELOG.md index f6ea78a5..33e69f30 100644 --- a/crates/ruma-federation-api/CHANGELOG.md +++ b/crates/ruma-federation-api/CHANGELOG.md @@ -2,6 +2,32 @@ Breaking changes: +- Remove the `origin` field in `create_join_event::{v1/v2}::RoomState` due to a + clarification in the spec. + +Improvements: + +- The `unstable-unspecified` cargo feature was removed. The `pdus` field of + `send_transaction_message::v1::Request` is always serialized. To allow this + field to be missing during deserialization, use the `compat-optional-txn-pdus` + cargo feature. +- ruma-server-util was merged into this crate. `XMatrix` is available in the + `authentication` module. + +# 0.11.0 + +Improvements: + +- The `unstable-exhaustive-types` cargo feature was replaced by the + `ruma_unstable_exhaustive_types` compile-time `cfg` setting. Like all `cfg` + settings, it can be enabled at compile-time with the `RUSTFLAGS` environment + variable, or inside `.cargo/config.toml`. It can also be enabled by setting + the `RUMA_UNSTABLE_EXHAUSTIVE_TYPES` environment variable. + +# 0.10.0 + +Breaking changes: + - Remove the unused `KeyObject` struct. It is actually supposed to be the same type as `ruma_common::encryption::SignedKey`. - Use `OwnedOneTimeKeyId` and `OneTimeKeyAlgorithm` instead of diff --git a/crates/ruma-federation-api/Cargo.toml b/crates/ruma-federation-api/Cargo.toml index 16e79e9c..31de1f12 100644 --- a/crates/ruma-federation-api/Cargo.toml +++ b/crates/ruma-federation-api/Cargo.toml @@ -31,7 +31,9 @@ unstable-unspecified = [] [dependencies] bytes = { workspace = true, optional = true } +headers = "0.4.0" http = { workspace = true } +http-auth = { version = "0.1.9", default-features = false } httparse = { version = "1.9.0", optional = true } js_int = { workspace = true, features = ["serde"] } memchr = { version = "2.7.0", optional = true } @@ -41,6 +43,8 @@ ruma-common = { workspace = true, features = ["api"] } ruma-events = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } +thiserror = { workspace = true } +tracing = { workspace = true } [dev-dependencies] assert_matches2 = { workspace = true } diff --git a/crates/ruma-server-util/src/authorization.rs b/crates/ruma-federation-api/src/authentication.rs similarity index 100% rename from crates/ruma-server-util/src/authorization.rs rename to crates/ruma-federation-api/src/authentication.rs diff --git a/crates/ruma-federation-api/src/lib.rs b/crates/ruma-federation-api/src/lib.rs index c48cdd25..d55dd46d 100644 --- a/crates/ruma-federation-api/src/lib.rs +++ b/crates/ruma-federation-api/src/lib.rs @@ -13,6 +13,7 @@ use std::fmt; mod serde; pub mod authenticated_media; +pub mod authentication; pub mod authorization; pub mod backfill; pub mod device; diff --git a/crates/ruma-server-util/README.md b/crates/ruma-server-util/README.md deleted file mode 100644 index 51b90550..00000000 --- a/crates/ruma-server-util/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# ruma-server-util - -[![crates.io page](https://img.shields.io/crates/v/ruma-server-util.svg)](https://crates.io/crates/ruma-server-util) -[![docs.rs page](https://docs.rs/ruma-server-util/badge.svg)](https://docs.rs/ruma-server-util/) -![license: MIT](https://img.shields.io/crates/l/ruma-server-util.svg) - -**ruma-server-util** contains types and trait implementations useful for implementing a Matrix homeserver. diff --git a/crates/ruma-server-util/src/lib.rs b/crates/ruma-server-util/src/lib.rs deleted file mode 100644 index 7e6b9859..00000000 --- a/crates/ruma-server-util/src/lib.rs +++ /dev/null @@ -1,6 +0,0 @@ -#![doc(html_favicon_url = "https://ruma.dev/favicon.ico")] -#![doc(html_logo_url = "https://ruma.dev/images/logo.png")] -//! Collection of helpers for implementing Matrix homeservers using Ruma. - -#![warn(missing_docs)] -pub mod authorization; diff --git a/crates/ruma/CHANGELOG.md b/crates/ruma/CHANGELOG.md index 098f19e9..5de06c9d 100644 --- a/crates/ruma/CHANGELOG.md +++ b/crates/ruma/CHANGELOG.md @@ -5,6 +5,9 @@ - The `unstable-unspecified` cargo feature was removed. - ruma-client is not reexported by ruma anymore, it lives as its own separate crate. All the corresponding features were removed. +- ruma-server-util was merged into ruma-federation-api. The corresponding + feature was removed. `XMatrix` is available in the + `api::federation::authentication` module. - Bump MSRV to 1.81 # 0.12.1 diff --git a/crates/ruma/Cargo.toml b/crates/ruma/Cargo.toml index 8cca9b46..31f3dcae 100644 --- a/crates/ruma/Cargo.toml +++ b/crates/ruma/Cargo.toml @@ -18,7 +18,6 @@ all-features = true api = ["ruma-common/api"] canonical-json = ["ruma-common/canonical-json", "ruma-events?/canonical-json"] events = ["dep:ruma-events"] -server-util = ["dep:ruma-server-util"] signatures = ["dep:ruma-signatures", "canonical-json"] #state-res = ["dep:ruma-state-res"] @@ -326,7 +325,6 @@ ruma-common = { workspace = true } ruma-events = { workspace = true, optional = true } ruma-html = { workspace = true, optional = true } -ruma-server-util = { workspace = true, optional = true } ruma-signatures = { workspace = true, optional = true } #ruma-state-res = { workspace = true, optional = true } diff --git a/crates/ruma/src/lib.rs b/crates/ruma/src/lib.rs index 2669d573..6be1ac29 100644 --- a/crates/ruma/src/lib.rs +++ b/crates/ruma/src/lib.rs @@ -89,9 +89,6 @@ pub use ruma_html as html; #[cfg(feature = "identifiers-validation")] #[doc(inline)] pub use ruma_identifiers_validation as identifiers_validation; -#[cfg(feature = "server-util")] -#[doc(inline)] -pub use ruma_server_util as server_util; #[cfg(feature = "signatures")] #[doc(inline)] pub use ruma_signatures as signatures;