From 7d0deceb42a0743a2b790e678415cbe69f346540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Fri, 24 Apr 2026 11:18:52 +0200 Subject: [PATCH 1/5] Fix formatting of Cargo.toml --- Cargo.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b3eb633..ae21a7c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,8 +54,10 @@ tokio-stream = "0.1.8" rust_2018_idioms = { level = "warn", priority = -1 } semicolon_in_expressions_from_macros = "warn" unexpected_cfgs = { level = "warn", check-cfg = [ - 'cfg(ruma_identifiers_storage, values("Arc"))', # used by the IdZst macro - 'cfg(ruma_unstable_exhaustive_types)', # set all types as exhaustive + # used by the IdZst macro + 'cfg(ruma_identifiers_storage, values("Arc"))', + # set all types as exhaustive + 'cfg(ruma_unstable_exhaustive_types)', ] } unreachable_pub = "warn" unused_import_braces = "warn" From 5155371a842bed61870b5c34d7106288b204dd79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Fri, 24 Apr 2026 11:06:30 +0200 Subject: [PATCH 2/5] Remove unused dependency --- Cargo.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index ae21a7c..d1bd809 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,7 +43,6 @@ hyper-tls = { version = "0.6.0", optional = true } hyper-util = { version = "0.1.3", optional = true, features = ["client-legacy", "http1", "http2", "tokio"] } reqwest = { version = "0.13", optional = true, default-features = false } ruma = { version = "0.14.1", features = ["api"] } -serde_html_form = "0.2.0" tracing = { version = "0.1.30", default-features = false, features = ["std"] } [dev-dependencies] From 46daffb798bdcbc774ccf77f6c144d4481c4d7df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Sat, 25 Apr 2026 09:29:00 +0200 Subject: [PATCH 3/5] Add cargo-machete exception --- Cargo.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index d1bd809..e1993e9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,6 +14,12 @@ rust-version = "1.88" [package.metadata.docs.rs] all-features = true +[package.metadata.cargo-machete] +ignored = [ + # Used to enable features that are not reexported by hyper-tls. + "hyper", +] + [features] client-api = ["dep:as_variant", "ruma/client-api-c"] From 17b0cb73046b4b1422d18406a0c8159314434e56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Sat, 25 Apr 2026 09:34:43 +0200 Subject: [PATCH 4/5] Add rumdl configuration file and apply formatting fixes --- .rumdl.toml | 33 +++++++++++++++++++++++++++++ CHANGELOG.md | 56 +++++++++++++++++++++++++------------------------ CONTRIBUTING.md | 40 ++++++++++++++++++----------------- 3 files changed, 83 insertions(+), 46 deletions(-) create mode 100644 .rumdl.toml diff --git a/.rumdl.toml b/.rumdl.toml new file mode 100644 index 0000000..32bc08f --- /dev/null +++ b/.rumdl.toml @@ -0,0 +1,33 @@ +cache = false + +[per-file-ignores] +"crates/ruma-common/src/doc/*.md" = ["first-line-heading"] +"crates/ruma-client-api/src/doc/*.md" = ["first-line-heading"] +"crates/ruma-events/src/doc/*.md" = ["first-line-heading"] +"crates/ruma-macros/src/doc/*.md" = ["first-line-heading"] + +[code-block-style] +style = "fenced" + +[code-fence-style] +style = "backtick" + +[emphasis-style] +style = "underscore" + +[heading-style] +style = "atx" + +[line-length] +line-length = 100 +code-blocks = false +tables = false + +[ol-prefix] +style = "ordered" + +[strong-style] +style = "asterisk" + +[ul-style] +style = "dash" diff --git a/CHANGELOG.md b/CHANGELOG.md index 877ce76..58513d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,13 @@ -# [unreleased] +# Changelog + +## [unreleased] Breaking changes: - Upgrade reqwest to 0.13. - The `reqwest-*` cargo features were updated to match the changes upstream. -# 0.17.0 +## 0.17.0 Breaking changes: @@ -17,28 +19,28 @@ Breaking changes: - Bump MSRV to 1.88 - `Client::send_request_as()` and `HttpClientExt::send_matrix_request_as()` now take `AppserviceUserIdentity` instead of `&UserId`. - + Improvements: - `ClientBuilder` now has `token_mode()` which takes a `TokenMode` for correlation to `SendAccessToken` behavior. - -# 0.16.0 + +## 0.16.0 Breaking changes: - Upgrade ruma to 0.13.0. - `ClientBuilder::supported_matrix_versions()` now takes a `SupportedVersions`. -# 0.15.0 +## 0.15.0 Upgrade `ruma-client-api` to 0.20.0. -# 0.14.0 +## 0.14.0 No changes for this version -# 0.13.0 +## 0.13.0 Breaking changes: @@ -48,60 +50,60 @@ Improvements: - Add `error_kind` accessor method to `Error` -# 0.12.0 +## 0.12.0 No changes for this version -# 0.11.0 +## 0.11.0 No changes for this version -# 0.10.0 +## 0.10.0 Breaking changes: -* Upgrade dependencies +- Upgrade dependencies -# 0.9.0 +## 0.9.0 Breaking changes: -* Upgrade dependencies +- Upgrade dependencies -# 0.8.0 +## 0.8.0 Breaking changes: -* Upgrade dependencies -* The whole `Client` is now feature-gated (`client-api` feature). +- Upgrade dependencies +- The whole `Client` is now feature-gated (`client-api` feature). We may introduce a separate `FederationClient` and possibly other types like that in the future. Improvements: -* Rewrite `Client` initialization and store server-supported Matrix versions in +- Rewrite `Client` initialization and store server-supported Matrix versions in it, to determine whether to use stable, unstable or r0 paths for endpoints -# 0.7.0 +## 0.7.0 Breaking changes: -* Upgrade dependencies +- Upgrade dependencies -# 0.6.0 +## 0.6.0 Breaking changes: -* Upgrade ruma-client-api to 0.11.0 +- Upgrade ruma-client-api to 0.11.0 -# 0.5.0 +## 0.5.0 Breaking changes: -* Make `Client` generic over the http client -* Make the ruma-client-api dependency optional -* Upgrade dependencies +- Make `Client` generic over the http client +- Make the ruma-client-api dependency optional +- Upgrade dependencies Improvements: -* Add support for multiple HTTP clients +- Add support for multiple HTTP clients diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8f456cb..84d12ab 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,8 @@ +# Contributing + Welcome! Thanks for looking into contributing to our project! -# Table of Contents +## Table of Contents - [Looking for Help?](#looking-for-help) - [Documentation](#documentation) @@ -14,22 +16,22 @@ Welcome! Thanks for looking into contributing to our project! - [LLM Contributions](#llm-contributions) - [Project-related use of LLMs](#project-related-use-of-llms) -# Looking for Help? +## Looking for Help? Here is a list of helpful resources you can consult: -## Documentation +### Documentation - [Matrix spec Documentation](https://spec.matrix.org/latest/) - [Ruma Documentation](https://docs.rs/ruma/latest/ruma/) -## Chat Rooms +### Chat Rooms - Ruma Matrix room: [#ruma:matrix.org](https://matrix.to/#/#ruma:matrix.org) - Ruma Development Matrix room: [#ruma-dev:matrix.org](https://matrix.to/#/#ruma-dev:matrix.org) - Matrix Developer room: [#matrix-dev:matrix.org](https://matrix.to/#/#matrix-dev:matrix.org) -# Reporting Issues +## Reporting Issues If you find any bugs, inconsistencies or other problems, feel free to submit a GitHub [issue](https://github.com/ruma/ruma-client/issues/new). @@ -40,21 +42,21 @@ If you have a quick question, it may be easier to leave a message in Also, if you have trouble getting on board, let us know so we can help future contributors to the project overcome that hurdle too. -# Submitting Code +## Submitting Code Ready to write some code? Great! Here are some guidelines to follow to help you on your way: -## Coding Style +### Coding Style In general, try to replicate the coding style that is already present. Specifically: -### Naming +#### Naming For internal consistency, Ruma uses American spelling for variable names. Names may differ in the serialized representation, as the Matrix specification has a mix of British and American English. -### Code Formatting and Linting +#### Code Formatting and Linting We use [rustfmt] to ensure consistent formatting code and [clippy] to catch common mistakes not caught by the compiler as well as enforcing a few custom @@ -78,13 +80,13 @@ check that code [rustfmt]: https://github.com/rust-lang/rustfmt#readme [clippy]: https://github.com/rust-lang/rust-clippy#readme -### Import Formatting +#### Import Formatting Organize your imports into three groups separated by blank lines: 1. `std` imports -1. External imports (from other crates) -1. Local imports (`self::`, `super::`, `crate::` and things like `LocalEnum::*`) +2. External imports (from other crates) +3. Local imports (`self::`, `super::`, `crate::` and things like `LocalEnum::*`) For example, @@ -96,7 +98,7 @@ use ruma_common::api::ruma_api; use super::MyType; ``` -### Commit Messages +#### Commit Messages Write commit messages using the imperative mood, as if completing the sentence: "If applied, this commit will \_\_\_." For example, use "Fix some bug" instead @@ -106,31 +108,31 @@ of "Fixed some bug" or "Add a feature" instead of "Added a feature". [blog post](https://www.freecodecamp.org/news/writing-good-commit-messages-a-practical-guide/) for more information on writing good commit messages.) -### Tracking Changes +#### Tracking Changes If your changes affect the public API, add an entry about them to the change log (`CHANGELOG.md`). -## Submitting PRs +### Submitting PRs Once you're ready to submit your code, create a pull request, and one of our maintainers will review it. Once your PR has passed review, a maintainer will merge the request and you're done! 🎉 -## Where do I start? +### Where do I start? If this is your first contribution to the project, we recommend taking a look at one of the [open issues][] we've marked for new contributors. [open issues]: https://github.com/ruma/ruma-client/issues?q=is%3Aissue+is%3Aopen+label%3A"help+wanted" -# Testing +## Testing Before committing, run `cargo check` to make sure that your changes can build, as well as running the formatting and linting tools [mentioned above](#code-formatting-and-linting). -# LLM Contributions +## LLM Contributions Contributions must not include content generated by large language models or other probabilistic tools like ChatGPT, Claude, and Copilot. @@ -147,7 +149,7 @@ including, but not limited to, code, documentation, issues, and artworks. An exception applies for purely translating texts for issues and comments to English. We may make more exceptions for other accessibility-related uses. -## Project-related use of LLMs +### Project-related use of LLMs We heavily discourage the use of LLM chat bots as a replacement for reading Ruma's documentation and API reference. From 841824db50343425fee2b1bf26e21bf378e43cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Sat, 25 Apr 2026 09:32:12 +0200 Subject: [PATCH 5/5] Use CI workflow from ruma repository --- .github/workflows/ci.yml | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2c13128..4ce55c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,30 +14,7 @@ on: jobs: style: name: Style - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v6 - - - name: Install rust nightly toolchain - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ env.NIGHTLY }} - - - uses: Swatinem/rust-cache@v2 - - - name: Check spelling - uses: crate-ci/typos@v1.39.2 - - - name: Install cargo-sort - uses: taiki-e/cache-cargo-install-action@v2 - with: - tool: cargo-sort - - - name: Run cargo-sort - run: | - cargo sort --workspace --grouped --check \ - --order package,lib,features,dependencies,target,dev-dependencies,build-dependencies + uses: ruma/ruma/.github/workflows/style.yml@main msrv: name: Minimum Supported Rust Version / Check All Features