#matrix #chat #messaging #ruma

ruma

Types and traits for working with the Matrix protocol

10 releases (4 breaking)

0.4.0 Aug 26, 2021
0.2.0 Jun 21, 2021
0.0.2 Jan 2, 2021
0.0.1 Jul 29, 2020
0.0.0 Jan 5, 2017

#331 in Web programming

Download history 289/week @ 2021-08-18 621/week @ 2021-08-25 763/week @ 2021-09-01 2487/week @ 2021-09-08 1107/week @ 2021-09-15 343/week @ 2021-09-22 517/week @ 2021-09-29 473/week @ 2021-10-06 357/week @ 2021-10-13 385/week @ 2021-10-20 209/week @ 2021-10-27 231/week @ 2021-11-03 145/week @ 2021-11-10 208/week @ 2021-11-17 349/week @ 2021-11-24 290/week @ 2021-12-01

1,038 downloads per month
Used in 15 crates (8 directly)

MIT license

615KB
13K SLoC

ruma

crates.io page docs.rs page license: MIT

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

lib.rs:

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.

⚠ Some details might be missing because rustdoc has trouble with re-exports so you may need to refer to other crates' documentations.

API features

Depending on which parts of Matrix are relevant to you, activate the following features:

  • appservice-api -- Application Service API.
  • client-api -- Client-Server API.
  • federation-api -- Server-Server (Federation) API.
  • identity-service-api -- Identity Service API.
  • push-gateway-api -- Push Gateway API.

These features have client- and server-optimized variants that are enabled respectively with the -c and -s suffixes. For example:

  • client-api-c -- The Client-Server API optimized for the client side.
  • client-api-s -- The Client-Server API optimized for the server side.

Compatibility feature

  • compat increases compatibility with other parts of the Matrix ecosystem, at the expense of deviating from the specification.

Convenience features

These features are only useful if you want to use a method that requires it:

  • either
  • rand
  • markdown

Unstable features

By using these features, you opt out of all semver guarantees Ruma otherwise provides:

  • unstable-exhaustive-types -- Most types in Ruma are marked as non-exhaustive to avoid breaking changes when new fields are added in the specification. This feature compiles all types as exhaustive.
  • unstable-pre-spec -- Upcoming Matrix features that may be subject to change or removal.

Common features

These submodules are usually activated by the API features when needed:

  • api
  • events
  • signatures

ruma-client features

The client feature activates [ruma::client][client], and client-ext-client-api activates ruma-clients client-api feature. All other client-* features activate the same feature without the client- prefix on ruma-client. See the crate's documentation for the effect of these features.

If you are viewing this on docs.rs, you can have a look at the feature dependencies by clicking Feature flags in the toolbar at the top.

Dependencies

~2.1–8MB
~179K SLoC

Pn'a